Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/commands/apps-create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

logger.info("");
logger.info("You can run this command to print out your new app's Google Services config:");
logger.info(` firebase apps:sdkconfig ${appPlatform} ${appMetadata.appId}`);
logger.info(` firebase apps:sdkconfig ${appPlatform} ${appMetadata.appId} -o`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using the -o flag is a great UX improvement. However, it might be slightly misleading for users. The command will save the configuration file to the current working directory, which often isn't the correct location within a project (e.g., inside the app directory for Android). A user might assume the setup is complete when it's not.

Additionally, the preceding log on line 44, "You can run this command to print out your new app's Google Services config:", is now inaccurate since the command writes to a file instead of printing to standard output.

To make this clearer, I suggest adding a note for the user. Since I can only suggest changes to this line, my suggestion adds another log statement. Ideally, line 44 should also be updated to reflect that the command downloads a file.

  logger.info(`  firebase apps:sdkconfig ${appPlatform} ${appMetadata.appId} -o`);
  logger.info("  Note: This will download the config file to your current directory. You may need to move it to the correct location in your project.");

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this comment and just tested it out

}

interface AppsCreateOptions extends Options {
Expand Down Expand Up @@ -78,7 +78,7 @@
});
}

const appPlatform = getAppPlatform(platform);

Check warning on line 81 in src/commands/apps-create.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe argument of type `any` assigned to a parameter of type `string`
if (appPlatform === AppPlatform.ANY /* platform is not provided */) {
throw new FirebaseError("App platform must be provided");
}
Expand Down
Loading