Skip to content

Commit bd7015b

Browse files
authored
šŸ› When a non-root user redeploys, an error is reported and folder permissions cannot be set. #1023
2 parents ce9b72b + 5f2b068 commit bd7015b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

ā€Ždocker/deploy.shā€Ž

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -499,14 +499,9 @@ create_dir_with_permission() {
499499
fi
500500

501501
# Set directory permissions
502-
chmod -R "$permission" "$dir_path"
503-
if [ $? -ne 0 ]; then
504-
echo " āŒ ERROR Failed to set permissions $permission for directory $dir_path." >&2
505-
ERROR_OCCURRED=1
506-
return 1
502+
if chmod -R "$permission" "$dir_path" 2>/dev/null; then
503+
echo " šŸ“ Directory $dir_path has been created and permissions set to $permission."
507504
fi
508-
509-
echo " šŸ“ Directory $dir_path has been created and permissions set to $permission."
510505
}
511506

512507
prepare_directory_and_data() {

0 commit comments

Comments
Ā (0)