Skip to content

Commit 782e849

Browse files
committed
nixos-modules/microvm/ssh-deploy: fix for pristine deployments
1 parent d6faefa commit 782e849

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nixos-modules/microvm/ssh-deploy.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ in
137137
if [[ $(realpath ./current) != $(realpath ./new) ]]; then
138138
echo "Installing MicroVM ${hostName}"
139139
rm -f old
140-
mv current old
140+
if [ -e current ]; then
141+
mv current old
142+
fi
141143
mv new current
142144
143145
echo "Success. Diff:"

0 commit comments

Comments
 (0)