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

Suggestions for why parallelshell breaks node-notifier? #52

Open
simensen opened this issue Mar 29, 2016 · 0 comments
Open

Suggestions for why parallelshell breaks node-notifier? #52

simensen opened this issue Mar 29, 2016 · 0 comments

Comments

@simensen
Copy link

I've wanted to add notification to the end of some of my build paths and have run into issues where I'm using parallelshell for watching. That is, the same set of commands ( build:scripts, build:templates, etc. ) are called by two paths, either a npm run build or npm run watch.

In the case of the former, the build script simply calls npm run build:scripts && npm run build:templates.

In the case of the latter, there are nodemon's watching a directory that call the corresponding script ( build:scripts, build:templates, etc. ) as things become available.

If I put a call to notify in, say, build:templates, it works fine if I call it directly ( either npm run build or npm run build:templates ). However, if it is called inside parallelshell it fails ( npm run watch -> nodemon ).

You can try it out for yourself by using this simple package:

{
  "dependencies": {
    "node-notifier": "^4.5.0",
    "parallelshell": "^2.0.0"
  },
  "scripts": {
    "works": "npm run notify",
    "broken": "parallelshell \"npm run notify\"",
    "notify": "notify -t \"Some Title\" -m \"Some Message\" || echo 'failed'"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants