Skip to content

Remove process 'exit' listener when uninstalling #1

@cspotcode

Description

@cspotcode

In this code, if is uninstalled, should remove the event listener to avoid running that code twice.

let uninstalled = false;
    const uninstall = () => {
      if(uninstalled) return;
      uninstalled = true;
      if (blobStore.isDirty()) {
        blobStore.save();
      }
      nativeCompileCache.uninstall();
    }
    process.once('exit', uninstall);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions