From 8c799da867e1a6b8af48d9ef3ddef281471bd393 Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 7 Jan 2011 21:08:10 +0100 Subject: [PATCH] bugfix: osproc compiles under windows again --- koch.nim | 2 +- lib/pure/osproc.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koch.nim b/koch.nim index 9e0ea1a542..273f0b79f9 100644 --- a/koch.nim +++ b/koch.nim @@ -124,8 +124,8 @@ proc bootIteration(args: string): bool = exec "rod" / "nimrod1 cc $# $# rod/nimrod.nim" % [bootOptions, args] # Nimrod does not produce an executable again if nothing changed. That's ok: result = sameFileContent("rod" / "nimrod".exe, nimrod1) - safeRemove("bin" / "nimrod".exe) var dest = "bin" / "nimrod".exe + safeRemove(dest) copyFile(dest=dest, source="rod" / "nimrod".exe) inclFilePermissions(dest, {fpUserExec}) safeRemove(nimrod1) diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index 082851a81f..e13f508b6e 100755 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -319,7 +319,7 @@ when defined(Windows) and not defined(useNimRtl): result.errorHandle = si.hStdError var cmdl: cstring - if false: # poUseShell in options: + when false: # poUseShell in options: cmdl = buildCommandLine(getEnv("COMSPEC"), @["/c", command] & args) else: cmdl = buildCommandLine(command, args)