Skip to content

Commit 0fcc99c

Browse files
committed
fix: restore support of project param
Close #2633
1 parent c03ad38 commit 0fcc99c

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

packages/electron-builder-lib/src/packager.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,6 @@ export class Packager {
136136

137137
//noinspection JSUnusedGlobalSymbols
138138
constructor(options: PackagerOptions, readonly cancellationToken = new CancellationToken()) {
139-
if ("project" in options) {
140-
throw new InvalidConfigurationError("Use projectDir instead of project")
141-
}
142-
143139
if ("devMetadata" in options) {
144140
throw new InvalidConfigurationError("devMetadata in the options is deprecated, please use config instead")
145141
}

packages/electron-builder/src/builder.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ export function normalizeOptions(args: CliOptions): BuildOptions {
122122
delete result.arch
123123

124124
const r = result as any
125-
delete r.em
126-
127125
delete r.m
128126
delete r.o
129127
delete r.l
@@ -141,7 +139,6 @@ export function normalizeOptions(args: CliOptions): BuildOptions {
141139
delete result.armv7l
142140

143141
let config = result.config
144-
delete r.extraMetadata
145142

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

170+
if ("project" in r && !("projectDir" in result)) {
171+
result.projectDir = r.project
172+
delete r.project
173+
}
173174
return result as BuildOptions
174175
}
175176

0 commit comments

Comments
 (0)