Skip to content

Commit ec98c62

Browse files
committed
Ignore warnings of ls command that are printed when directory is empty
1 parent 1e35323 commit ec98c62

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

1.10/s2i/bin/assemble

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fi
2525

2626
if [ -d ./nginx-start-hook ]; then
2727
echo "---> Copying nginx start-hook scripts..."
28-
if [ "$(ls -A ./nginx-start-hook/*)" ]; then
28+
if [ "$(ls -A ./nginx-start-hook/* 2>/dev/null)" ]; then
2929
cp -v ./nginx-start-hook/* "${NGINX_CONTAINER_SCRIPTS_PATH}/nginx-start-hook/"
3030
rm -rf ./nginx-start-hook
3131
fi

1.12/s2i/bin/assemble

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fi
2525

2626
if [ -d ./nginx-start-hook ]; then
2727
echo "---> Copying nginx start-hook scripts..."
28-
if [ "$(ls -A ./nginx-start-hook/*)" ]; then
28+
if [ "$(ls -A ./nginx-start-hook/* 2>/dev/null)" ]; then
2929
cp -v ./nginx-start-hook/* "${NGINX_CONTAINER_SCRIPTS_PATH}/nginx-start-hook/"
3030
rm -rf ./nginx-start-hook
3131
fi

1.8/s2i/bin/assemble

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fi
2525

2626
if [ -d ./nginx-start-hook ]; then
2727
echo "---> Copying nginx start-hook scripts..."
28-
if [ "$(ls -A ./nginx-start-hook/*)" ]; then
28+
if [ "$(ls -A ./nginx-start-hook/* 2>/dev/null)" ]; then
2929
cp -v ./nginx-start-hook/* "${NGINX_CONTAINER_SCRIPTS_PATH}/nginx-start-hook/"
3030
rm -rf ./nginx-start-hook
3131
fi

0 commit comments

Comments
 (0)