Skip to content
This repository was archived by the owner on Dec 21, 2022. It is now read-only.

Commit 2aeca65

Browse files
author
Illia Obukhau
authored
Merge pull request #1612 from mendix/fix/issue-with-gh-release-create
fix: wrap gh cli params with single quotes
2 parents 24ec4ae + a909deb commit 2aeca65

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

scripts/release/module-automation/commons.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,18 @@ async function createGithubRelease(moduleInfo, moduleChangelogs, mpkOutput) {
241241
}
242242

243243
async function createGithubReleaseFrom({ title, body, tag, mpkOutput, isDraft = false }) {
244-
const draftArgument = isDraft ? "--draft " : "";
245-
await execShellCommand(
246-
`gh release create --title "${title}" --notes "${body}" ${draftArgument}"${tag}" "${mpkOutput}"`
247-
);
244+
const command = [
245+
`gh release create`,
246+
`--title '${title}'`,
247+
`--notes '${body}'`,
248+
isDraft ? "--draft" : "",
249+
`'${tag}'`,
250+
`'${mpkOutput}'`
251+
]
252+
.filter(str => str !== "")
253+
.join(" ");
254+
255+
await execShellCommand(command);
248256
}
249257

250258
function zip(src, fileName) {

0 commit comments

Comments
 (0)