-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Postinstall not fit for Windows #181
Postinstall not fit for Windows #181
Comments
@waiblinger thanks for the report, what terminal are you using on Windows? I was actually testing it on Windows prior release and all worked well. |
I use the integrated terminal in Visual Studio Code (so cmd). The project ran yesterday befor the changes. |
@medikoo I tried powershell as well. Same problem |
@medikoo I'm trying to install 'gulp-cli' from 'npm' and I have the same problem (Windows 10):
'Windows Powershell' (version 5.1) comes with 'Windows 10', executable file 'powershell.exe'. 'Windows Powershell' (version 5.1) does not have an pipeline chain operator I think the line Then it will work for those who have installed 'PowerShell 7'. |
It's actually an |
@medikoo Thanks for the reply. I've already figured it out.
And now I have succeeded (I also installed 'PowerShell 7'): Thanks again. 🎉🎉🎉 |
@mrJli Are you really running the installation in PowerShell? PowerShell command prompt usually looks like this Can you show a screenshot without cropping the window title? |
|
@mrJli Earlier it was about a mistake with operator You have a different situation. You have a unary operator
'es5-ext' is responsible for part of the command:
I think 'npm' is responsible for the initial part:
Maybe it's a bug in What version of 'npm' do you have ( |
npm version - 8.19.2 |
I have zero issue with the message and intent behind the postinstall script, but perhaps unintended consequences like this are a good argument for limiting that sort of thing to the |
This was quite frustrating to figure out, since I was calling my script from PowerShell core, but this postinstall script was still being called from PowerShell 5. I haven't had issues on any other machine I've ran it on, but this one apparently didn't have pwsh configured as the "script-shell". If it helps, here are the versions of software/libs I'm running: And the solution for me was to set pwsh as the script-shell: |
The more I look into it, I think the specific problem might occur if PowerShell 5 (or earlier) was previously specified as the script-shell. cmd.exe actually does allow "||" and "&&" operators, so I think the problem is specifically with older versions of PowerShell being the default script-shell. |
It would have been PowerShell 6 and earlier with the problem, my mistake |
Fixed with v0.10.63 release |
Unfortunately it breaks gulp-cli installation, when using older node version: |
@mar777121 ensure you rely on latest v0.10.63, as mentioned above that issue was fixed |
Thanks @medikoo, I've checked, it does use the latest version.
|
@mar777121 I understand that issue is, that this wasn't fixed completely, right? And not that patch introduced a new issue. |
@medikoo Indeed, it seems that while patch fixed the windows PowerShell issue, introduced a new issue, specific to linux. |
@mar777121 indeed so apparently we got #143 back (I totally forgot about this case). Is anyone aware of a way which may fix the issue for both of the cases? |
@mar777121 I've decided to revert that fix, it's published with v0.10.64. If anyone knows to how to fix the Windows issue, without introducing issues for Linux systems I'll be grateful for a hint |
Hi,
since the update yesterday I can't install my modules, since the postinstall script uses "||", which isn`t supported on Windows in the given context.
The text was updated successfully, but these errors were encountered: