adamralph / bau

The C# task runner
MIT License
152 stars 17 forks source link

Correctly forward arguments for Unix #226

Closed jamesqo closed 8 years ago

jamesqo commented 8 years ago

Using $@ to forward arguments will break for arguments with whitespace. Using "$@" preserves this, e.g. ./build.sh 'foo bar' baz will call scriptcs ./baufile.csx 'foo bar' baz and not scriptcs ./baufile.csx foo bar baz.

adamralph commented 8 years ago

@jamesqo thanks!

BTW - I'm no *nix expert. What difference does exec make?

jamesqo commented 8 years ago

exec runs scriptcs without having to spawn a subshell. Basically improves performance, there's no need to fork a new process.

adamralph commented 8 years ago

@jamesqo sounds good. Thanks!