Skip to content

Commit

Permalink
fix(nsis): Single quote in a product name leads to NSIS failure
Browse files Browse the repository at this point in the history
Close #2686
  • Loading branch information
develar committed Mar 18, 2018
1 parent f9ee025 commit 7a9d220
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
jobs:
build:
docker:
- image: circleci/node:9.5
- image: circleci/node:9.8
steps:
- checkout
- restore_cache:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ Var pid

doStopProcess:

DetailPrint 'Closing running "${PRODUCT_NAME}"...'
DetailPrint `Closing running "${PRODUCT_NAME}"...`

# https://github.com/electron-userland/electron-builder/issues/2516#issuecomment-372009092
ExecWait 'taskkill /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid"' $R0
ExecWait `taskkill /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid"` $R0
# to ensure that files are not "in-use"
Sleep 100

Expand All @@ -57,9 +57,9 @@ Var pid
# wait to give a chance to exit gracefully
Sleep 1000
# do not use /t tree kill - app was killed softly already
ExecWait 'taskkill /f /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid"' $R0
ExecWait `taskkill /f /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid"` $R0
${If} $R0 != 0
DetailPrint 'Waiting for "${PRODUCT_NAME}" to close (taskkill exit code $R0).'
DetailPrint `Waiting for "${PRODUCT_NAME}" to close (taskkill exit code $R0).`
Sleep 2000
${endIf}
${endIf}
Expand Down
4 changes: 2 additions & 2 deletions test/out/windows/__snapshots__/oneClickInstallerTest.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,15 @@ Object {
"win": Array [
Object {
"arch": "ia32",
"file": "Test Menu Category CustomName 1.1.0.exe",
"file": "Test Menu Category ' CustomName 1.1.0.exe",
"safeArtifactName": "test-menu-category-setup-1.1.0.exe",
"updateInfo": Object {
"sha512": "@sha512",
"size": "@size",
},
},
Object {
"file": "Test Menu Category CustomName 1.1.0.exe.blockmap",
"file": "Test Menu Category ' CustomName 1.1.0.exe.blockmap",
"safeArtifactName": "test-menu-category-setup-1.1.0.exe.blockmap",
"updateInfo": Object {
"sha512": "@sha512",
Expand Down
4 changes: 2 additions & 2 deletions test/src/helpers/checkDeps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ async function check(projectDir: string, devPackageData: any): Promise<boolean>

// console.log(result)

const unusedDependencies = packageName === "electron-builder" ?
const unusedDependencies = (packageName === "electron-builder" ?
result.dependencies.filter(it => it !== "electron-download-tf" && it !== "dmg-builder") :
result.dependencies
result.dependencies).filter(it => it !== "bluebird-lst")
if (unusedDependencies.length > 0) {
console.error(`${chalk.bold(packageName)} Unused dependencies: ${JSON.stringify(unusedDependencies, null, 2)}`)
return false
Expand Down
2 changes: 1 addition & 1 deletion test/src/windows/oneClickInstallerTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ test.ifAll.ifNotCiMac("string menuCategory", app({
config: {
extraMetadata: {
name: "test-menu-category",
productName: "Test Menu Category"
productName: "Test Menu Category '"
},
publish: null,
nsis: {
Expand Down

0 comments on commit 7a9d220

Please sign in to comment.