Skip to content

Commit 32e0058

Browse files
committed
Use os./ instead of static pathstring due to nix=/ and win="
1 parent cce81d7 commit 32e0058

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

nmqtt/utils/version.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ from strutils import replace, splitLines, split, contains
33
from os import `/`
44

55
macro nimbleVersion(): void =
6-
let n = staticRead(currentSourcePath().replace("/nmqtt/utils/version.nim") / "nmqtt.nimble")
6+
let n = staticRead(currentSourcePath().replace("nmqtt" / "utils" / "version.nim") / "nmqtt.nimble")
77
var v: string
88
for line in n.splitLines:
99
let l = split(line, " = ")
1010
if l[0].contains("version"):
11-
v = l[1].replace("\"", "")
11+
v = l[1]
1212
break
13-
result = parseStmt("const nmqttVersion* = \"" & v & "\"")
13+
result = parseStmt("const nmqttVersion* = " & v)
1414

1515
nimbleVersion()

0 commit comments

Comments
 (0)