Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use mapIt instead of map, see
Browse files Browse the repository at this point in the history
timotheecour committed Aug 8, 2018
1 parent 7b4f114 commit bbdb105
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
@@ -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"

0 comments on commit bbdb105

Please sign in to comment.