Skip to content

Commit

Permalink
use mapIt instead of map, see nim-lang#8303
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Aug 8, 2018
1 parent 161782b commit 3e1d7ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/pure/ospaths.nim
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,8 @@ when defined(windows) or defined(posix) or defined(nintendoswitch):
assert quoteShellCommand(["aaa", "", "c d"]) == "aaa '' 'c d'"
when defined(windows):
assert quoteShellCommand(["aaa", "", "c d"]) == "aaa \"\" \"c d\""
result = args.map(quoteShell).join(" ")
# can't use `map` pending https://github.com/nim-lang/Nim/issues/8303
result = args.mapIt(quoteShell(it)).join(" ")

when isMainModule:
assert quoteShellWindows("aaa") == "aaa"
Expand Down

0 comments on commit 3e1d7ca

Please sign in to comment.