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

fix: post installs fails with powershell #690

Closed
wants to merge 1 commit into from

Conversation

dopry
Copy link

@dopry dopry commented Nov 7, 2019

with npm config set script-shell powershell.exe the postinstall hook
failes with the error

> node postinstall || echo "ignore"

At line:1 char:18
+ node postinstall || echo "ignore"
+                  ~~
The token '||' is not a valid statement separator in this version.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : InvalidEndOfLine

with npm config set script-shell powershell.exe the postinstall hook
failes with the error

```
> node postinstall || echo "ignore"

At line:1 char:18
+ node postinstall || echo "ignore"
+                  ~~
The token '||' is not a valid statement separator in this version.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : InvalidEndOfLine
```
@dopry
Copy link
Author

dopry commented Nov 7, 2019

applies to #582

@@ -48,6 +48,6 @@
"shim"
],
"scripts": {
"postinstall": "node postinstall || echo \"ignore\""
"postinstall": "node -e \"try { require('./scripts/postinstall'); } catch (e) { }; process.exit(0) \""
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'./scripts/postinstall' -> './postinstall'.

Is process.exit(0) necessary?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dopry any news?

@zloirock zloirock closed this in a51adfd Nov 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants