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 tabtab\src\complete.js produces an error on Git Bash on Windows #36

Open
infernocloud opened this issue Jul 7, 2017 · 1 comment

Comments

@infernocloud
Copy link

infernocloud commented Jul 7, 2017

Error message

fs.js:641
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open 'C:\Users\<user>\AppData\Roaming\npm\node_modules\
serverless\node_modules\tabtab\scripts\C:\Program Files\Git\usr\bin\bash.sh'
    at Error (native)
    at Object.fs.openSync (fs.js:641:18)
    at fs.readFileSync (fs.js:509:33)
    at Complete.script (C:\Users\<user>\AppData\Roaming\npm\node_modules\serverless\node_modules\
tabtab\src\complete.js:373:14)
    at Installer.writeTo (C:\Users\<user>\AppData\Roaming\npm\node_modules\serverless\node_module
s\tabtab\src\installer.js:91:34)
    at Installer.handle (C:\Users\<user>\AppData\Roaming\npm\node_modules\serverless\node_modules
\tabtab\src\installer.js:80:21)
    at Commands.install (C:\Users\<user>\AppData\Roaming\npm\node_modules\serverless\node_modules
\tabtab\src\commands\index.js:75:22)
    at Object.<anonymous> (C:\Users\<user>\AppData\Roaming\npm\node_modules\serverless\node_modul
es\tabtab\src\cli.js:33:16)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
Could not auto-install serverless autocomplete script.
Please copy / paste the script above into your shell.

Looking at the source of tabtab\src\complete.js at line 373 it is using a variable to try to find the right .sh file to load. It is trying to parse this out of the shell information but on Windows in Git Bash it is staying the full path to bash.

  • Operating System: Windows 10 (64 bit)
  • Shell: "Git bash" that is included with the Git for Windows installation.
@LosD
Copy link

LosD commented Sep 27, 2017

This seems to only happen when using --auto, at least for me. If I run without --auto and choose "Bash config file (~/.bashrc)", it works without issue.

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