Improve shell script arguments handling #33

fluidblue opened this Issue Nov 29, 2013 · 5 comments


None yet
2 participants

When switching on ignoreErrors with --ignoreerrors, an ENOENT error occurs.
Without the --ignoreerrors, everything is working fine.


mkdir -p ./build/httpdocs/js
webmake --ext=coffee --ignoreerrors ./src/js/gui/ ./build/httpdocs/js/passdeposit.js

results in

            throw this.value;
Error: ENOENT, open '/Users/max/Desktop/PassDeposit/build/httpdocs/js/passdeposit.js'

medikoo commented Nov 29, 2013

Can you prepare some good test case, that would reproduce that on my side? I haven't seen issues using ignoreErrors option.

@ghost ghost assigned medikoo Nov 29, 2013

I created a test:

When you execute make, webmake is called without --ignoreerrors and everything is fine. When executing make test, webmake is called with --ignoreerrors and it throws an error like this:

webmake --ext=coffee --ignoreerrors ./src/ ./build/test.js

            throw this.value;
Error: ENOENT, open '/Users/max/Desktop/webmake-test/build/test.js'

medikoo commented Dec 2, 2013

@fluidblue thanks.

Issue lies in your build script, you call: webmake --ext=coffee --ignoreerrors ./src/ ./build/test.js, which translates to webmake('./build/test.js', { ext: 'coffee', sourceMap: false, ignoreErrors: false }).

Thing is that it should be --ignore-errors, not --ignoreerrors. Latter is unrecognized option, and argument that follows that is taken as its value (it's swallowed).

I'll rename this issue, to "Improve shell script arguments handling", and leave it open until we have it more bulletproof so such errors doesn't come as unnoticed.

Ah I see. Now it works.

It is a little bit confusing, that the sourceMap option is --sourcemap on the commandline whereas ignoreErrors is --ignore-errors

It might be helpful to include the commandline equivalents in the options documentation.


medikoo commented Dec 2, 2013

@fluidblue that's true, it's not consistent. I'll probably fix this and assure consistency from v0.4

medikoo added a commit that referenced this issue Dec 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment