Skip to content

Commit 80c18dd

Browse files
Fix a non-POSIX shell redirection in entrypoints
Since we switched entrypoint shebangs from `/bin/bash` to `/bin/sh` (under the hood: `dash` on Debian, `ash` on Alpine) in d70ebaa, entrypoints must be POSIX compliant. Unfortunately, the `&>` redirection is not POSIX-compliant and resulted in the left-hand command to be executed in background (without stdout/stdin redirection) because of the `&` character. This commit uses a POSIX-compliant way to redirect both stdin and stdout to `/dev/null`.
1 parent a22d9e7 commit 80c18dd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

entrypoints/bundler-entrypoint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fi
88

99
if [ -f Gemfile ]; then
1010
echo -n "Checking bundle... "
11-
if bundle check &> /dev/null; then
11+
if bundle check > /dev/null 2>&1; then
1212
echo "all good 👌"
1313
else
1414
echo "Something is missing 💥"

entrypoints/yarn-entrypoint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if [ -f package.json ]; then
1313
|| echo "yarn check --integrity --verify-tree --silent" \
1414
)
1515
echo -n "Checking JS modules... "
16-
if eval ${check_command} &> /dev/null; then
16+
if eval ${check_command} > /dev/null 2>&1; then
1717
echo "all good 👌"
1818
else
1919
echo "something is missing 💥"

0 commit comments

Comments
 (0)