From c12bab17a8d438d76d77322f4545030d4c31c135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 15 Mar 2022 15:32:17 +0200 Subject: [PATCH] Print default base branch for danger local This uses commander default argument value --- source/commands/danger-local.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/commands/danger-local.ts b/source/commands/danger-local.ts index 640d4f8c7..64b94b5c4 100644 --- a/source/commands/danger-local.ts +++ b/source/commands/danger-local.ts @@ -18,13 +18,13 @@ program .usage("[options]") .description("Runs danger without PR metadata, useful for git hooks.") .option("-s, --staging", "Just use staged changes.") - .option("-b, --base [branch_name]", "Use a different base branch") + .option("-b, --base [branch_name]", "Use a different base branch", "master") .option("-j, --outputJSON", "Outputs the resulting JSON to STDOUT") .allowUnknownOption(true) setSharedArgs(program).parse(process.argv) const app = (program as any) as App -const base = app.base || "master" +const base = app.base const localPlatform = new LocalGit({ base, staging: app.staging }) localPlatform.validateThereAreChanges().then(changes => {