Skip to content

Commit

Permalink
Don't try restoring a file if no backup is available
Browse files Browse the repository at this point in the history
This caused `all.sh --force` to fail on a clean build tree.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
  • Loading branch information
gilles-peskine-arm committed Sep 22, 2022
1 parent e9ff465 commit 423dd13
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/scripts/all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ cleanup()

# Restore files that may have been clobbered by the job
for x in $files_to_back_up; do
cp -p "$x$backup_suffix" "$x"
if [[ -e "$x$backup_suffix" ]]; then
cp -p "$x$backup_suffix" "$x"
fi
done
}

Expand Down

0 comments on commit 423dd13

Please sign in to comment.