Skip to content

Commit d6c2737

Browse files
committed
fix: fix custom publisher check and throw error if not found
1 parent fb3b15f commit d6c2737

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.changeset/eight-mails-bathe.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": patch
3+
---
4+
5+
fix: fix custom publisher check and throw error if not found

packages/app-builder-lib/src/publish/PublishManager.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ async function requireProviderClass(provider: string, packager: Packager): Promi
354354
return BitbucketPublisher
355355

356356
default: {
357-
const extensions = [".mjs", ".js", ".cjs"]
357+
const extensions = ["mjs", "js", "cjs"]
358358
const template = `electron-publisher-${provider}`
359359
const name = (ext: string) => `${template}.${ext}`
360360

@@ -365,7 +365,8 @@ async function requireProviderClass(provider: string, packager: Packager): Promi
365365
return module.default || module
366366
}
367367
}
368-
log.warn({ path: log.filePath(packager.buildResourcesDir), template, extensionsChecked: extensions }, "unable to find publish provider in build resources")
368+
log.error({ path: log.filePath(packager.buildResourcesDir), template, extensionsChecked: extensions }, "unable to find publish provider in build resources")
369+
throw new InvalidConfigurationError(`Cannot find module for publisher "${provider}" with any extension: ${extensions.join(", ")}`)
369370
}
370371
}
371372
}

0 commit comments

Comments
 (0)