ocaml-opam / Camelus

Bot posting reports on opam-repository pull-request using a web hook
Other
18 stars 9 forks source link

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

Open dsheets opened 8 years ago

dsheets commented 8 years ago

-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 commented 8 years ago

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

hannesm commented 8 years ago

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 commented 8 years ago

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.