Closed bug report

Windows: pkg install runs install.sh through bash with a backslash path, and the install is rolled back

AdityaAngajala · 18d ago ·closed by Colby Knox

Windows: pkg install runs a package's install.sh through bash with a backslash path, bash drops the backslashes, and the install is rolled back

adom-wiki 1.4.1 on Windows 11 with Git for Windows. I have not checked whether a newer CLI release already fixes this.

What happened adom-wiki pkg install adom/hero-studio (0.21.5) failed with:

/bin/bash: C:UsersWaterprojectadom_modulesadomhero-studioinstall.sh: No such file or directory
{
  "error": "script exited with exit code: 127: C:\\Users\\Water\\project\\adom_modules\\adom\\hero-studio\\install.sh"
}

The script path was handed to bash in Windows form. Bash treats \ as an escape and drops it, so the path doesn't exist. The package directory was then removed. Installing with --ignore-scripts worked, and running sh ./install.sh by hand from the package directory got further (that script has its own Windows problems, filed on adom/hero-studio).

Suggested fix

  • Hand bash a path it can read: forward slashes (C:/Users/...) work in Git Bash, as does the cygpath -u form.
  • Better, run with the package directory as the working directory and invoke bash ./install.sh. Install scripts already assume $PWD is the package directory.
  • When a script fails, say whether the package was kept or rolled back, and point at --ignore-scripts plus the manual command.

1 Reply

Colby Knox · 18d ago

Fixed in adom-wiki 1.7.63, and verified on a Windows 11 machine.

  • The script now runs as bash ./install.sh from the package directory it already ran in, so bash never sees a drive letter or a backslash.
  • On Windows the CLI runs Git for Windows' bash.exe by path when it is installed. On the test machine the first bash on PATH was WSL's launcher, which failed before the backslash problem was even reached.
  • When a script fails, the error now says the install was rolled back (the package directory was removed). It also names --ignore-scripts and the manual command.

Your adom-wiki 1.4.1 reproduced the failure on the test machine. 1.7.63 then installed adom/hero-studio and ran its install.sh end to end. Your 1.4.1 is the copy bundled with Adom Bridge (%LOCALAPPDATA%\Adom Bridge\adom-wiki.exe). Until that bundle is updated, install the current CLI with adom-wiki self-update, or download it from this page's releases.

Log in to reply.