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

As a Windows Hyper user, I should be able to install packages regardless of which shell I am using #1480

Closed
2 tasks done
belthesar opened this issue Feb 3, 2017 · 5 comments
Labels
help wanted Contributions wanted towards the issue 🖼 Platform: Windows Issue pertains to Windows 🤯 Type: Compatibility Issue contains information about a compatibility issue in Hyper

Comments

@belthesar
Copy link

belthesar commented Feb 3, 2017

  • I am on the latest Hyper.app version
  • I have searched the issues of this repo and believe that this is not a duplicate

Issue

Problem: When running a shell other than 'cmd' on Windows, packages do not install successfully.
Steps to Reproduce:

  1. With a functional Hyper install (vanilla, or with packages installed), modify your .hyper.js config to change the shell to a different shell (EG: "C:\Windows\System32\bash.exe" or "%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe").
  2. Add or remove packages.

Expected Result:

Packages are installed or uninstalled as requested by adjusting the config.

Actual Result:

Packages are not installed. Error suggest to look at %userprofile%.hyper_plugins\npm-debug.log
This log file is never generated.

Additional info: Running Hyper within a cmd window provides additional logging that suggests that there is some sort of hard coding that is attempting to run whatever the current shell is with switches that only work with 'cmd'.

plugins have changed / not init, scheduling plugins installation
running in prod mode
electron will open file://C:\Users\belthesar\AppData\Local\hyper\app-1.1.0\resources\app\index.html
Checking for notification messages
No matching notification messages
Error: Command failed: npm prune && npm install --production
/bin/bash: /s: No such file or directory

    at ChildProcess.exithandler (child_process.js:218:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:493:12)
[Notification] Error updating plugins.: Check `~/.hyper_plugins/npm-debug.log` for more information.
@gluons
Copy link

gluons commented Feb 9, 2017

Me too. I'm using PowerShell. I can't install any package.

@timothyis timothyis added 🖼 Platform: Windows Issue pertains to Windows help wanted Contributions wanted towards the issue 🤯 Type: Compatibility Issue contains information about a compatibility issue in Hyper labels Feb 10, 2017
@srimajji
Copy link

I remember reading a temp fix in a different PR.

Comment this line in plugins.js.
Restart hyper and try to install any hyper package

@jordansjones
Copy link

jordansjones commented Feb 14, 2017

@srimajji That does fix the issue.

The problem is Node's child_process.exec requires the shell passed in the shell parameter to support the -c switch on UNIX and /s /c on Windows.

It may be better to not pass the shell option during the plugin work.

@belthesar
Copy link
Author

belthesar commented Feb 14, 2017

It may be better to not pass the shell option during the plugin work.

@jordansjones Agreed with this recommendation. Unless there's a need to preserve environment, which I can't see, lowest common denominator shell execution seems like the preferred behavior across all platforms.

@Stanzilla
Copy link
Collaborator

Hey there, please try again with the new Hyper v2 release and open a new issue if the problem stills exists. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions wanted towards the issue 🖼 Platform: Windows Issue pertains to Windows 🤯 Type: Compatibility Issue contains information about a compatibility issue in Hyper
Projects
None yet
Development

No branches or pull requests

6 participants