Skip to content

Commit

Permalink
fix: custom publisher extension check and throw error if not found (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaietta authored Mar 3, 2025
1 parent fb3b15f commit 3caab3c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-mails-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": patch
---

fix: fix custom publisher check and throw error if not found
5 changes: 3 additions & 2 deletions packages/app-builder-lib/src/publish/PublishManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ async function requireProviderClass(provider: string, packager: Packager): Promi
return BitbucketPublisher

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

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

0 comments on commit 3caab3c

Please sign in to comment.