Skip to content

Commit 95535bf

Browse files
committedFeb 25, 2023
Only add --exclude-from=.gitignore if the .gitignore file exists
1 parent 49f9197 commit 95535bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎deploy.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ function build_sync_command() {
3838
fi
3939

4040
# Ignore everything in the .gitingore file. With proper .gitignore file, it will ignore all the files (especially to not delete) that are there on the remote server.
41-
sync_command="${sync_command} --exclude-from=.gitignore"
41+
if [ -f .gitignore ]; then
42+
sync_command="${sync_command} --exclude-from=.gitignore"
43+
fi
4244

4345
}
4446

0 commit comments

Comments
 (0)
Please sign in to comment.