Skip to content

Commit af55231

Browse files
committed
fix: preserve user-requested platform as fallback in formatProjectCreated
The old code used `project.platform || platform` where `platform` was the user's CLI argument. The migration lost this fallback by hardcoding "unknown". Add `requestedPlatform` field to `ProjectCreatedResult` and use it as fallback when the API response has no platform set.
1 parent 1799ac2 commit af55231

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/commands/project/create.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ export const createCommand = buildCommand({
408408
orgSlug,
409409
teamSlug: team.slug,
410410
teamSource: team.source,
411+
requestedPlatform: platform,
411412
dsn,
412413
url,
413414
slugDiverged: project.slug !== expectedSlug,

src/lib/formatters/human.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1246,6 +1246,8 @@ export type ProjectCreatedResult = {
12461246
teamSlug: string;
12471247
/** How the team was resolved */
12481248
teamSource: "explicit" | "auto-selected" | "auto-created";
1249+
/** The platform the user requested via CLI argument (used as fallback display) */
1250+
requestedPlatform: string;
12491251
/** Primary DSN, if fetched successfully */
12501252
dsn: string | null;
12511253
/** Sentry web URL for the project settings page */
@@ -1299,7 +1301,7 @@ export function formatProjectCreated(result: ProjectCreatedResult): string {
12991301
["Slug", safeCodeSpan(result.project.slug)],
13001302
["Org", safeCodeSpan(result.orgSlug)],
13011303
["Team", safeCodeSpan(result.teamSlug)],
1302-
["Platform", result.project.platform || "unknown"],
1304+
["Platform", result.project.platform || result.requestedPlatform],
13031305
];
13041306
if (result.dsn) {
13051307
kvRows.push(["DSN", safeCodeSpan(result.dsn)]);

0 commit comments

Comments
 (0)