Skip to content

[changelog skip] Shellcheck#33

Merged
schneems merged 7 commits intomainfrom
schneems/shellcheck
Nov 13, 2020
Merged

[changelog skip] Shellcheck#33
schneems merged 7 commits intomainfrom
schneems/shellcheck

Conversation

@schneems
Copy link
Copy Markdown
Contributor

shellcheck -x bin/build bin/compile bin/detect bin/release bin/support/bash_functions.sh
⛄ 2.7.2 🚀  ~/Documents/projects/work/minimal-ruby (schneems/shellcheck)
$ echo $?
0

@schneems schneems changed the title Shellcheck [changelog skip] Shellcheck Nov 13, 2020
Remove all warnings 

```
shellcheck -x bin/build bin/compile bin/detect bin/release bin/support/bash_functions.sh
⛄ 2.7.2 🚀  ~/Documents/projects/work/minimal-ruby (schneems/shellcheck)
$ echo $?
0
```
@schneems schneems force-pushed the schneems/shellcheck branch 8 times, most recently from d0b8c1d to 9d897e9 Compare November 13, 2020 19:29
The java buildpack exports this file:

```
export JAVA_HOME=/tmp/build_c6a36294/.jdk
export PATH=$JAVA_HOME/bin:$PATH
export LD_LIBRARY_PATH="$JAVA_HOME/jre/lib/amd64/server:$LD_LIBRARY_PATH"
```

Which raises this error when sourcing with strict mode on:

```
line 3: LD_LIBRARY_PATH: unbound variable
```

The solution from http://redsymbol.net/articles/unofficial-bash-strict-mode/#sourcing-nonconforming-document and @edmorley is to reduce the checking level before sourcing and then to increase it after.
Linux does not have a `-s` flag, but Mac does. This instead directs output to `/dev/null` so it doesn't show up in our build output.
@schneems schneems force-pushed the schneems/shellcheck branch from 9d897e9 to 86aa3cf Compare November 13, 2020 19:42
@schneems schneems force-pushed the schneems/shellcheck branch from 86aa3cf to 6be86ae Compare November 13, 2020 19:44
@schneems schneems force-pushed the schneems/shellcheck branch 3 times, most recently from 73b798a to 9f99a88 Compare November 13, 2020 20:42
@schneems schneems force-pushed the schneems/shellcheck branch from 9f99a88 to 4b3df95 Compare November 13, 2020 20:44
@schneems schneems merged commit ad1768c into main Nov 13, 2020
@edmorley edmorley deleted the schneems/shellcheck branch July 16, 2021 09:41
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