Skip to content

Commit 20bebfc

Browse files
Moved the trap to setup_environment_darwin.sh
Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
1 parent 654b7fd commit 20bebfc

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.expeditor/scripts/end_to_end/run_e2e_test_darwin.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ source .expeditor/scripts/end_to_end/setup_environment_darwin.sh "$channel"
1212

1313
pwsh_path="$(command -v pwsh)"
1414

15-
# Clean up the writable APFS volume mounted at /hab when done
16-
trap 'sudo -E bash -c "source .expeditor/scripts/shared.sh && HAB_VOLUME_DEVICE=$HAB_VOLUME_DEVICE teardown_hab_root_macos_pipeline"' EXIT
17-
1815
if [ -n "$test_name" ]; then
1916
sudo -E "$pwsh_path" .expeditor/scripts/end_to_end/run_e2e_test_core.ps1 "$test_name"
2017
else

.expeditor/scripts/end_to_end/setup_environment_darwin.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ HAB_VOLUME_DEVICE=$(cat "$HAB_VOLUME_DEVICE_FILE")
2929
rm -f "$HAB_VOLUME_DEVICE_FILE"
3030
export HAB_VOLUME_DEVICE
3131

32+
# Clean up the writable APFS volume mounted at /hab when done
33+
trap 'sudo -E bash -c "source .expeditor/scripts/shared.sh && \
34+
HAB_VOLUME_DEVICE=$HAB_VOLUME_DEVICE \
35+
teardown_hab_root_macos_pipeline"' ERR EXIT
36+
3237
# Note: We should always have a `hab` binary installed in our CI
3338
# Anka VMs.
3439

0 commit comments

Comments
 (0)