Skip to content

Commit

Permalink
trap before error
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshnj committed Jun 20, 2024
1 parent 8c648ba commit e1db922
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/spm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ restore_workspace() {
}

rename_workspace
echo "Building SDK for platform $platform"
xcodebuild build -scheme $SCHEME -destination generic/platform="$platform" | xcbeautify

# try to restore the files even if the script fails
trap restore_workspace EXIT INT

echo "Building SDK for platform $platform"
xcodebuild build -scheme $SCHEME -destination generic/platform="$platform" | xcbeautify

0 comments on commit e1db922

Please sign in to comment.