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

Running commands that use Bash scripts on Windows #37

Open
pmoura opened this issue Feb 26, 2017 · 3 comments
Open

Running commands that use Bash scripts on Windows #37

pmoura opened this issue Feb 26, 2017 · 3 comments

Comments

@pmoura
Copy link

pmoura commented Feb 26, 2017

I'm using version 0.12.0. It works as expected on macOS to run Bash scripts. But I cannot get it to work on Windows. I have a Bash shell installed (thanks to Git for Windows) and set its path ("C:\\Program Files\\Git\\git-bash.exe") in the plug-in preferences as the shell to be used. However, any attempt to run a command that uses a Bash script give a ENOENT error.

Any hints on how to use commands that call Bash scripts on Windows?

@morassman
Copy link
Owner

Hi @pmoura

I've never used git-bash before and haven't used Windows in a while either. The git-bash downloads, for some reason, are not working at the moment, but I'll try again later.

The ENOENT error means that a file could not be found. Exactly which file that is isn't obvious. Does the error actually say what the path of the file is that it couldn't find?

Until I can reproduce it I only have the following guesses:

  • Maybe git-bash.exe cannot be found. Try putting git-bash.exe on you PATH. You can test if it works by just running git-bash.exe from the normal command line without specifying the full path. Then configure process-palette simply with git-bash.exe instead of the full path.
  • Maybe the script isn't executable? There's a post on Stack Overflow about that.
  • This is a long shot, but maybe you need admin rights to run git-bash. Try running Atom as administrator.

These are just guesses, but I'll see if I can reproduce it on my side.

@pmoura
Copy link
Author

pmoura commented Feb 28, 2017

Adding the path to git-bash.exe to the system PATH does allow it to be called from the cmd.exe default shell. But the error persists (without any details of which file is not found, unfortunately). But given that the path to git-bash.exe is specified in the plug-in preferences, maybe this is an issue of the Bash shell requiring a different way to pass arguments compared with the default shell (cmd.exe)?

The scripts that i'm trying to call are executable (I verified that by calling them without issues from the Bash shell).

@pmoura
Copy link
Author

pmoura commented Feb 28, 2017

Running the editor as an administrator also doesn't solve the problem.

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

No branches or pull requests

2 participants