Skip to content

Commit 36e85fb

Browse files
Nightly install: Only attempt OSX signing if not already signed (#19381)
###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/Azure/bicep/pull/19381)
1 parent bb64279 commit 36e85fb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/install_cli_nightly.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ gh run download -R $repo $runId -n "bicep-release-$platform-$arch" --dir $tmpDir
5151

5252
# Install
5353
if [[ $platform == "osx" ]]; then
54-
# Ad-hoc sign the binary
55-
codesign -s - "$tmpDir/bicep"
54+
# Ad-hoc sign the binary if not already signed
55+
if ! codesign -v "$tmpDir/bicep" 2>/dev/null; then
56+
codesign -s - "$tmpDir/bicep"
57+
fi
5658
fi
5759

5860
mkdir -p $binaryPath
@@ -63,4 +65,4 @@ version=$("$binaryPath/bicep" --version | sed 's/^.* \([0-9]*\.[0-9]*\.[0-9]*\)
6365
echo "Installed Bicep $version from https://github.com/$repo/actions/runs/$runId to $binaryPath/bicep"
6466

6567
# Cleanup
66-
rm -Rf $tmpDir
68+
rm -Rf $tmpDir

0 commit comments

Comments
 (0)