Skip to content

Commit 2ac1fef

Browse files
committed
fix(release): ensure github token is a string
1 parent 8b6bdf5 commit 2ac1fef

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/cli/src/commands/release.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ async function handleGitHubReleaseCreation(
4848
throw new Error("Could not parse GitHub owner/repo from remote URL.");
4949

5050
const [owner, repo] = match[1].replace(".git", "").split("/");
51+
52+
if (typeof token !== "string" || !token) {
53+
throw new Error("Invalid GitHub token. Please run 'stackcode config' to set it.");
54+
}
55+
5156
await createGitHubRelease({ owner, repo, tagName, releaseNotes, token });
5257
} catch (error: unknown) {
5358
ui.log.error(`\n${t("common.error_generic")}`);

0 commit comments

Comments
 (0)