Skip to content

Commit

Permalink
Escape pp-flags arguments when parsing .merlin (#266)
Browse files Browse the repository at this point in the history
Imagine a .merlin containing:
```
FLG -pp /Users/iwan/Development/pp-demo/./node_modules/.bin/napkinscript -ancient
```
`-ancient` shouldn't be picked up as separate compiler flag, but as part of
the napkinscript preprocessor
  • Loading branch information
IwanKaramazow authored and jaredly committed Apr 6, 2019
1 parent 89d759c commit f0b8264
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/analyze/State.re
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ let escapePpxFlag = flag => {
let parts = Utils.split_on_char(' ', flag);
switch(parts) {
| ["-ppx", ...ppx] => "-ppx " ++ (String.concat(" ", ppx) |> Filename.quote)
| ["-pp", ...pp] => "-pp " ++ (String.concat(" ", pp) |> Filename.quote)
| _ => flag
}
}
Expand Down

0 comments on commit f0b8264

Please sign in to comment.