Skip to content

Sh hardening#56

Closed
Et7f3 wants to merge 4 commits intoesy-ocaml:4.13.0+esyfrom
Et7f3:sh_hardening
Closed

Sh hardening#56
Et7f3 wants to merge 4 commits intoesy-ocaml:4.13.0+esyfrom
Et7f3:sh_hardening

Conversation

@Et7f3
Copy link

@Et7f3 Et7f3 commented Sep 30, 2021

% shellcheck -s sh esy-build esy-configure configure-windows clone-flexdll

In esy-build line 9:
set -o pipefail
       ^------^ SC3040: In POSIX sh, set option pipefail is undefined.


In esy-configure line 21:
set -o pipefail
       ^------^ SC3040: In POSIX sh, set option pipefail is undefined.


In clone-flexdll line 12:
    cd flexdll
    ^--------^ SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

Did you mean:
    cd flexdll || exit


In clone-flexdll line 14:
    cd ..
    ^---^ SC2103: Use a ( subshell ) to avoid having to cd back.

For more information:
  https://www.shellcheck.net/wiki/SC2164 -- Use 'cd ... || exit' or 'cd ... |...
  https://www.shellcheck.net/wiki/SC3040 -- In POSIX sh, set option pipefail ...
  https://www.shellcheck.net/wiki/SC2103 -- Use a ( subshell ) to avoid havin...

The two first commit use POSIX sh feature to reduce size of our patch.
Two last commits are intended to augment portability @marcinkozij Does it work better on FreeBSD ?

In esy-build line 9:
set -o pipefail
       ^------^ SC3040: In POSIX sh, set option pipefail is undefined.

In esy-configure line 21:
set -o pipefail
       ^------^ SC3040: In POSIX sh, set option pipefail is undefined.

https://www.shellcheck.net/wiki/SC3040 -- In POSIX sh, set option pipefail ...
@Et7f3 Et7f3 closed this Sep 30, 2021
@Et7f3 Et7f3 deleted the sh_hardening branch September 30, 2021 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant