Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for silent failure if process not found #26

Closed
dextermb opened this issue Nov 25, 2018 · 4 comments · Fixed by #29
Closed

Allow for silent failure if process not found #26

dextermb opened this issue Nov 25, 2018 · 4 comments · Fixed by #29
Labels
enhancement 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted

Comments

@dextermb
Copy link

dextermb commented Nov 25, 2018

Issuehunt badges

Rather than pushing the not found error to the errors array, I would like to see an option where it would just ignore that a process didn't exist.

Thoughts?

medusalix earned $30.00 by resolving this issue!

@robertsLando
Copy link

I have used this as workaround:

function tryKill(proc){
    return new Promise(function(resolve, reject){
      proc += process.platform == 'win32' ? '.exe' : '';
      fkill(proc, { force: true })
          .then(() => {
              console.log(proc, "killed");
              resolve();
          })
          .catch((err) => {
              console.log("Unable to kill", proc, err);
              resolve();
          })
    })
}

@sindresorhus
Copy link
Owner

Sure. PR welcome for an option for this.

@IssueHuntBot
Copy link

@IssueHunt has funded $30.00 to this issue. See it on IssueHunt

@IssueHuntBot
Copy link

@sindresorhus has rewarded $27.00 to @medusalix. See it on IssueHunt

  • 💰 Total deposit: $30.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $3.00

@issuehunt-oss issuehunt-oss bot added the 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt label May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants