File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,8 +102,8 @@ jobs:
102102
103103 - name : Run all discovered checks against azure-template using uv as package manager
104104 run : |
105- sdk_build azure-template -d $(pwd)/wheels --build_id 20250101.1
106- python eng/scripts/dispatch_checks.py --checks "$AZPYSDK_CHECKS" --wheel_dir $(pwd)/wheels azure-template
105+ sdk_build azure-template -d " $(pwd)/wheels" --build_id 20250101.1
106+ python eng/scripts/dispatch_checks.py --checks "$AZPYSDK_CHECKS" --wheel_dir " $(pwd)/wheels" azure-template
107107 shell : bash
108108 env :
109109 AZPYSDK_PIP_IMPL : " uv"
@@ -115,7 +115,7 @@ jobs:
115115
116116 - name : Run all discovered checks against azure-template using pip as package manager
117117 run : |
118- python eng/scripts/dispatch_checks.py --checks "$AZPYSDK_CHECKS" --wheel_dir $(pwd)/wheels azure-template
118+ python eng/scripts/dispatch_checks.py --checks "$AZPYSDK_CHECKS" --wheel_dir " $(pwd)/wheels" azure-template
119119 shell : bash
120120 env :
121121 AZPYSDK_PIP_IMPL : " pip"
Original file line number Diff line number Diff line change @@ -80,11 +80,13 @@ jobs:
8080 exit 1
8181 fi
8282
83- echo "typespec_repo=$REPO" >> $GITHUB_OUTPUT
84- echo "typespec_ref=$REF" >> $GITHUB_OUTPUT
85- echo "typespec_display_ref=$DISPLAY_REF" >> $GITHUB_OUTPUT
86- echo "typespec_ref_url=$REF_URL" >> $GITHUB_OUTPUT
87- echo "typespec_pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT
83+ {
84+ echo "typespec_repo=$REPO"
85+ echo "typespec_ref=$REF"
86+ echo "typespec_display_ref=$DISPLAY_REF"
87+ echo "typespec_ref_url=$REF_URL"
88+ echo "typespec_pr_number=$PR_NUMBER"
89+ } >> "$GITHUB_OUTPUT"
8890 echo "::notice::Regenerating from ${REPO}@${DISPLAY_REF}"
8991
9092 - name : Checkout microsoft/typespec
@@ -206,7 +208,9 @@ jobs:
206208
207209 # Restore regenerated files from the temp dir.
208210 mkdir -p "$GENERATED_DIR"
209- rm -rf "$GENERATED_DIR"/*
211+ # Use ${var:?} so that if GENERATED_DIR is empty, the command aborts
212+ # instead of expanding to "rm -rf /*" and deleting the filesystem.
213+ rm -rf "${GENERATED_DIR:?}"/*
210214 cp -r "$TMPDIR"/. "$GENERATED_DIR"
211215 rm -rf "$TMPDIR"
212216 git add -f "$GENERATED_DIR"/
You can’t perform that action at this time.
0 commit comments