From 06ccb851f805a3dab2c2eb8d7ac458c904def13c Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Fri, 26 Dec 2014 01:02:45 +0000 Subject: [PATCH] Fixes problems with stubs on bash. --- src/nimble.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: