Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Check for use of sh -exc instead of just sh -c #6

Open
dsheets opened this issue Mar 4, 2016 · 3 comments
Open

Check for use of sh -exc instead of just sh -c #6

dsheets opened this issue Mar 4, 2016 · 3 comments

Comments

@dsheets
Copy link

dsheets commented Mar 4, 2016

-x is useful to find out later what was actually executed.
-e is necessary for errors to be propagated correctly in all cases.

Some care will be required to ensure that the false positive rate is not too high due to variations in sh command line invocations.

@dsheets
Copy link
Author

dsheets commented Apr 4, 2016

Also, consider -u for erroring on using unset variables.

@hannesm
Copy link

hannesm commented Apr 4, 2016

should maybe sh be similar magic to make (which turns into gmake on FreeBSD), thus people can use sh (not "sh") in opam, and opam expands it to sh -excu!?

@dsheets
Copy link
Author

dsheets commented Apr 4, 2016

Unfortunately, it is difficult to distinguish between expressions and scripts as arguments to sh and therefore to toggle -c but I am interested in making this easier to use correctly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants