Skip to content

Commit

Permalink
feat(nsis): option NSIS warnings as errors
Browse files Browse the repository at this point in the history
Closes #763
  • Loading branch information
worldjoe authored and develar committed Sep 21, 2016
1 parent 30426b3 commit 9762991
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion src/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,15 @@ export interface NsisOptions {
* [LCID Dec](https://msdn.microsoft.com/en-au/goglobal/bb964664.aspx), defaults to `1033`(`English - United States`).
*/
readonly language?: string | null

/*
Defaults to `false`.
If `warningsAsErrors` is `true` (default): NSIS will treat warnings as errors.
If `warningsAsErrors` is `false`: NSIS will allow warnings.
*/
readonly warningsAsErrors?: boolean | null
}

/*
Expand Down Expand Up @@ -584,4 +593,4 @@ export function archFromString(name: string): Arch {
}

throw new Error(`Unsupported arch ${name}`)
}
}
4 changes: 2 additions & 2 deletions src/targets/nsis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export default class NsisTarget extends Target {
}

private async executeMakensis(defines: any, commands: any, isInstaller: boolean, originalScript: string) {
const args: Array<string> = ["-WX"]
const args: Array<string> = (this.options.warningsAsErrors === false) ? [] : ["-WX"]
for (let name of Object.keys(defines)) {
const value = defines[name]
if (value == null) {
Expand Down Expand Up @@ -271,4 +271,4 @@ export default class NsisTarget extends Target {
childProcess.stdin.end(script)
})
}
}
}

0 comments on commit 9762991

Please sign in to comment.