Skip to content

Commit

Permalink
fix: replace deprecated interface (#5049)
Browse files Browse the repository at this point in the history
Change process.mainModule to require.main as process.mainModule is deprecated since nodejs v14

Should not break as require.main has been around since v0.1.17
  • Loading branch information
ponyfleisch authored Jul 9, 2020
1 parent e87bd28 commit 11874be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/electron-builder/src/cli/install-app-deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function main() {
return installAppDeps(configureInstallAppDepsCommand(yargs).argv)
}

if (process.mainModule === module) {
if (require.main === module) {
log.warn("please use as subcommand: electron-builder install-app-deps")
main()
.catch(printErrorAndExit)
Expand Down

0 comments on commit 11874be

Please sign in to comment.