Skip to content

Commit fcfe141

Browse files
committed
fix(windows): lexer init not run; buildinfo contains newline
1 parent b358539 commit fcfe141

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Modules/getbuildinfo.nim

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ when NimMajor > 1:
77
else:
88
from std/os import `/../`, parentDir
99
import ./os_findExe_patch
10+
when defined(windows):
11+
from std/strutils import stripLineEnd
1012

1113
## see CPython/configure.ac
1214

@@ -20,7 +22,11 @@ else:
2022
bind srcdir_git
2123
let res = gorgeEx(git.exe & " --git-dir " & srcdir_git & " " & sub)
2224
assert res.exitCode == 0, res.output
23-
res.output
25+
when defined(windows):
26+
var outp = res.output
27+
outp.stripLineEnd
28+
outp
29+
else: res.output
2430

2531
const
2632
version = git.exec"rev-parse --short HEAD"

Parser/grammar.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type
4141
cursor: int
4242

4343

44-
const grammarLines = slurp("Grammar").split("\n")
44+
const grammarLines = slurp("Grammar").splitLines()
4545

4646

4747
var

0 commit comments

Comments
 (0)