From 8bdc0548175ac3feba968a89625143bacc005d4a Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 20 Sep 2019 09:44:50 +0200 Subject: [PATCH] fixes #703 --- src/nimble.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nimble.nim b/src/nimble.nim index 6c13ca9..4685eb0 100644 --- a/src/nimble.nim +++ b/src/nimble.nim @@ -348,7 +348,11 @@ proc installFromDir(dir: string, requestedVer: VersionRange, options: Options, # if the build fails then the old package will still be installed. if pkgInfo.bin.len > 0: let paths = result.deps.map(dep => dep.getRealDir()) - buildFromDir(pkgInfo, paths, options.action.passNimFlags & "-d:release") + let flags = if options.action.typ in {actionInstall, actionPath, actionUninstall, actionDevelop}: + options.action.passNimFlags + else: + @[] + buildFromDir(pkgInfo, paths, flags & "-d:release") let pkgDestDir = pkgInfo.getPkgDest(options) if existsDir(pkgDestDir) and existsFile(pkgDestDir / "nimblemeta.json"):