tabtab icon indicating copy to clipboard operation
tabtab copied to clipboard

Running tabtab\src\complete.js produces an error on Git Bash on Windows

Open infernocloud opened this issue 7 years ago • 1 comments

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.

infernocloud avatar Jul 07 '17 17:07 infernocloud

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.

LosD avatar Sep 27 '17 20:09 LosD