We never tested passing arguments with spaces to scripts generated by Pnut. Turns out we had missed quoting the $@ argument for make_argv and arguments with space were split.
This PR quotes the $@ argument and also adds quotes around the file in _open.
Testing
➜ ./examples/compiled/cp.sh file\ with\ space file\ with\ space2
➜ ./examples/compiled/cp.sh file\ with\ space "file with space3"
➜ sha256sum file\ with\ space file\ with\ space2 file\ with\ space3
3531baeb96f92076bef7b33f33781ed9e41c769bde6a528351116ea0648a4531 file with space
3531baeb96f92076bef7b33f33781ed9e41c769bde6a528351116ea0648a4531 file with space2
3531baeb96f92076bef7b33f33781ed9e41c769bde6a528351116ea0648a4531 file with space3
Context
We never tested passing arguments with spaces to scripts generated by Pnut. Turns out we had missed quoting the
$@
argument formake_argv
and arguments with space were split.This PR quotes the
$@
argument and also adds quotes around the file in_open
.Testing