Skip to content

Commit 77ee357

Browse files
authored
source-build-toolset-init.sh: fix tempDir no longer defined when EXIT trap is executed. (#3248)
1 parent 68bfa36 commit 77ee357

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eng/source-build-toolset-init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function source_only_toolset_init() {
7171
elif [ -f "$sourceBuiltArchive" ]; then
7272
# Extract safely into a private temporary directory and ensure cleanup.
7373
tempDir="$(mktemp -d)"
74-
trap 'rm -rf "${tempDir}"' EXIT
74+
trap "rm -rf '${tempDir}'" EXIT # tempDir is local, use double quotes to expand.
7575
tar -xzf "$sourceBuiltArchive" -C "$tempDir" PackageVersions.props
7676
packageVersionsPath="$tempDir/PackageVersions.props"
7777
fi

0 commit comments

Comments
 (0)