Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Added default value for `emulators.dataconnect.dataDir` to `init dataconnect`.
- Fixed an issue where `firebase` would error out instead of displaying help text.
9 changes: 4 additions & 5 deletions src/bin/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import * as fsutils from "../fsutils";
import * as utils from "../utils";
import * as winston from "winston";

let args = process.argv.slice(2);
const args = process.argv.slice(2);
let cmd: CommanderStatic;

function findAvailableLogFile(): string {
Expand Down Expand Up @@ -161,11 +161,10 @@ process.on("uncaughtException", (err) => {
});

if (!handlePreviewToggles(args)) {
cmd = client.cli.parse(process.argv);

// determine if there are any non-option arguments. if not, display help
args = args.filter((arg) => !arg.includes("-"));
// determine if there are any arguments. if not, display help
if (!args.length) {
client.cli.help();
} else {
cmd = client.cli.parse(process.argv);
}
}