Skip to content

Commit

Permalink
fix undefined behaviour when cd fails
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Mar 20, 2024
1 parent b0b7f6f commit ad7f487
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rootfs/etc/s6-overlay/scripts/startup
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if ! [[ -d "$SDIR" ]] || [[ -z "$(ls "$SDIR")" ]]; then
exit 0
fi

cd "$SDIR"
cd "$SDIR" || exit 1

for NAME in *; do
if ! s6wrap --quiet --prepend="$NAME" --timestamps --args "$SDIR/$NAME"; then
Expand Down
2 changes: 1 addition & 1 deletion rootfs/etc/s6-overlay/scripts/startup-finish
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if ! [[ -d "$SDIR" ]] || [[ -z "$(ls "$SDIR")" ]]; then
exit 0
fi

cd "$SDIR"
cd "$SDIR" || exit 1

for NAME in *; do
if ! s6wrap --quiet --prepend="$NAME" --timestamps --args "$SDIR/$NAME"; then
Expand Down

0 comments on commit ad7f487

Please sign in to comment.