Skip to content

Commit

Permalink
Merge #92
Browse files Browse the repository at this point in the history
92: strip new line from git outputs for --version r=alaviss a=alaviss

On Windows, `gorgeEx` doesn't seem to strip the trailing new line, so we
do it here instead.

Co-authored-by: Leorize <leorize+oss@disroot.org>
  • Loading branch information
bors[bot] and alaviss authored Dec 2, 2021
2 parents 143a0a3 + c85d402 commit f2a9b0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/commands.nim
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ proc getNimSourceData(): tuple[hash, date: string] {.compileTime.} =
let hashCall = gorgeEx("git rev-parse --verify HEAD")
let dateCall = gorgeEx("git log -1 --format=%cs HEAD")
if hashCall.exitCode == 0 and dateCall.exitCode == 0:
result = (hashCall.output, dateCall.output)
result = (hashCall.output.strip(), dateCall.output.strip())

proc writeVersionInfo(conf: ConfigRef; pass: TCmdLinePass) =
if pass == passCmd1:
Expand Down

0 comments on commit f2a9b0c

Please sign in to comment.