Skip to content

Commit eafa9cf

Browse files
committed
nixos-rebuild: fix double trap
Only one callback can be installed per signal in Bash. Because the previous `trap` removes the whole temporary workdir, the one around the SSH key is redundant.
1 parent 1120774 commit eafa9cf

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

terraform/nixos-rebuild/deploy.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ sshOpts+=(-o StrictHostKeyChecking=no)
2121

2222
if [[ -n ${SSH_KEY+x} && ${SSH_KEY} != "-" ]]; then
2323
sshPrivateKeyFile="$workDir/ssh_key"
24-
trap 'rm "$sshPrivateKeyFile"' EXIT
2524
# Create the file with 0700 - umask calculation: 777 - 700 = 077
2625
(
2726
umask 077

0 commit comments

Comments
 (0)