Skip to content

Commit f24a2ce

Browse files
authored
fix: Azure trust signing fails with spaces in parameters (#8979)
1 parent e41c24c commit f24a2ce

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/friendly-drinks-allow.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": patch
3+
---
4+
5+
Fix: Azure trust signing fails with spaces in parameters

packages/app-builder-lib/src/codeSign/windowsSignAzureManager.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ export class WindowsSignAzureManager implements SignManager {
130130
const paramsString = Object.entries(params)
131131
.filter(([_, value]) => value != null)
132132
.reduce((res, [field, value]) => {
133-
return [...res, `-${field}`, value]
133+
const escapedValue = String(value).replace(/'/g, "''")
134+
return [...res, `-${field}`, `'${escapedValue}'`]
134135
}, [] as string[])
135136
.join(" ")
136137
await vm.exec(ps, ["-NoProfile", "-NonInteractive", "-Command", `Invoke-TrustedSigning ${paramsString}`])

0 commit comments

Comments
 (0)