Skip to content

Commit

Permalink
fix: restore support of project param
Browse files Browse the repository at this point in the history
Close #2633
  • Loading branch information
develar committed Mar 6, 2018
1 parent c03ad38 commit 0fcc99c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 0 additions & 4 deletions packages/electron-builder-lib/src/packager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@ export class Packager {

//noinspection JSUnusedGlobalSymbols
constructor(options: PackagerOptions, readonly cancellationToken = new CancellationToken()) {
if ("project" in options) {
throw new InvalidConfigurationError("Use projectDir instead of project")
}

if ("devMetadata" in options) {
throw new InvalidConfigurationError("devMetadata in the options is deprecated, please use config instead")
}
Expand Down
7 changes: 4 additions & 3 deletions packages/electron-builder/src/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ export function normalizeOptions(args: CliOptions): BuildOptions {
delete result.arch

const r = result as any
delete r.em

delete r.m
delete r.o
delete r.l
Expand All @@ -141,7 +139,6 @@ export function normalizeOptions(args: CliOptions): BuildOptions {
delete result.armv7l

let config = result.config
delete r.extraMetadata

// config is array when combining dot-notation values with a config file value (#2016)
if (Array.isArray(config)) {
Expand Down Expand Up @@ -170,6 +167,10 @@ export function normalizeOptions(args: CliOptions): BuildOptions {
}
}

if ("project" in r && !("projectDir" in result)) {
result.projectDir = r.project
delete r.project
}
return result as BuildOptions
}

Expand Down

0 comments on commit 0fcc99c

Please sign in to comment.