Skip to content

Commit

Permalink
Print default base branch for danger local
Browse files Browse the repository at this point in the history
This uses commander default argument value
  • Loading branch information
glensc committed Mar 15, 2022
1 parent 1822fe1 commit c12bab1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/commands/danger-local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit c12bab1

Please sign in to comment.