File tree 1 file changed +6
-2
lines changed
Cabal/Distribution/Simple 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2245,8 +2245,11 @@ configureProg verbosity programDb prog = do
2245
2245
-- | Helper function to split a string into a list of arguments.
2246
2246
-- It's supposed to handle quoted things sensibly, eg:
2247
2247
--
2248
- -- > splitArgs "--foo=\"C:\Program Files\Bar\" --baz"
2249
- -- > = ["--foo=C:\Program Files\Bar", "--baz"]
2248
+ -- > splitArgs "--foo=\"C:/Program Files/Bar/" --baz"
2249
+ -- > = ["--foo=C:/Program Files/Bar", "--baz"]
2250
+ --
2251
+ -- > splitArgs "\"-DMSGSTR=\\\"foo bar\\\"\" --baz"
2252
+ -- > = ["-DMSGSTR=\"foo bar\"","--baz"]
2250
2253
--
2251
2254
splitArgs :: String -> [String ]
2252
2255
splitArgs = space []
@@ -2261,6 +2264,7 @@ splitArgs = space []
2261
2264
string :: String -> String -> [String ]
2262
2265
string w [] = word w []
2263
2266
string w (' "' : s) = space w s
2267
+ string w (' \\ ' : ' "' : s) = string (' "' : w) s
2264
2268
string w ( c : s) = string (c: w) s
2265
2269
2266
2270
nonstring :: String -> String -> [String ]
You can’t perform that action at this time.
0 commit comments