Skip to content

Commit

Permalink
use mapIt instead of map, see
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Aug 8, 2018
1 parent bb32c09 commit af4b164
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 af4b164

Please sign in to comment.