diff --git a/tasks/git/task.yaml b/tasks/git/task.yaml index e175924..964f821 100644 --- a/tasks/git/task.yaml +++ b/tasks/git/task.yaml @@ -109,7 +109,7 @@ spec: chmod 400 "$(params.USER_HOME)/.gitconfig" fi - if [ -d "$(workspaces.ssh-directory.path)" ]; then + if [ -n "$(workspaces.ssh-directory.path)" ] && [ -d "$(workspaces.ssh-directory.path)" ]; then cp -R "$(workspaces.ssh-directory.path)" "$(params.USER_HOME)/.ssh" chmod 700 "$(params.USER_HOME)/.ssh" chmod -R 400 "$(params.USER_HOME)/.ssh/*"