diff --git a/src/nimble.nim b/src/nimble.nim index aa41d8f..d6167c5 100644 --- a/src/nimble.nim +++ b/src/nimble.nim @@ -531,7 +531,10 @@ proc installFromDir(dir: string, latest: bool, options: TOptions, contents.add "chcp 65001\n" contents.add "\"" & pkgDestDir / bin & "\" %*\n" writeFile(dest, contents) - writeFile(dest.changeFileExt(""), contents) # For Git bash. + # For bash on Windows (Cygwin/Git bash). + let bashDest = dest.changeFileExt("") + echo("Creating Cygwin stub: ", pkgDestDir / bin, " -> ", bashDest) + writeFile(bashDest, "\"" & pkgDestDir / bin & "\" \"$@\"\n") else: {.error: "Sorry, your platform is not supported.".} else: