Skip to content

Commit 61651a3

Browse files
committed
Remove trailing space in nim r command; Amend one error message
1 parent 5f1ce3f commit 61651a3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

compiler/extccomp.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,8 +763,8 @@ template tryExceptOSErrorMessage(conf: ConfigRef; errorPrefix: string = "", body
763763
if errorPrefix.len > 0:
764764
rawMessage(conf, errGenerated, errorPrefix & " " & ose.msg & " " & $ose.errorCode)
765765
else:
766-
rawMessage(conf, errGenerated, "execution of an external program failed: '$1'" %
767-
(ose.msg & " " & $ose.errorCode))
766+
rawMessage(conf, errGenerated, "execution of an external program failed: '$1' error code: $2" %
767+
[ose.msg, $ose.errorCode])
768768
raise
769769

770770
proc getExtraCmds(conf: ConfigRef; output: AbsoluteFile): seq[string] =

compiler/nim.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ proc handleCmdLine(cache: IdentCache; conf: ConfigRef) =
116116
if cmdPrefix.len > 0: cmdPrefix.add " "
117117
# without the `cmdPrefix.len > 0` check, on windows you'd get a cryptic:
118118
# `The parameter is incorrect`
119-
execExternalProgram(conf, cmdPrefix & output.quoteShell & ' ' & conf.arguments)
119+
let cmd = cmdPrefix & output.quoteShell & ' ' & conf.arguments
120+
execExternalProgram(conf, cmd.strip(leading=false,trailing=true))
120121
of cmdDocLike, cmdRst2html, cmdRst2tex: # bugfix(cmdRst2tex was missing)
121122
if conf.arguments.len > 0:
122123
# reserved for future use

0 commit comments

Comments
 (0)