Skip to content

Commit 41abc33

Browse files
committed
use trap
1 parent 151f57c commit 41abc33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

terraform/build-lambda-layers

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ set -eu
44

55
# Script to build/upgrade lambda layers zip
66

7+
trap "rm -rf "${TEMP_DIR}"" EXIT
8+
79
CURRENT_DIR="$(pwd)"
810
TEMP_DIR="$(mktemp -d)"
911

@@ -31,4 +33,3 @@ zip -r "${CURRENT_DIR}/cryptography.zip" python
3133
rm -rf python/*
3234

3335
cd "${CURRENT_DIR}"
34-
rm -rf "${TEMP_DIR}"

0 commit comments

Comments
 (0)