Skip to content

Commit

Permalink
Merge pull request #472 from hawkrives/patch-2
Browse files Browse the repository at this point in the history
Check that the danger invocation isn't straight `danger`
  • Loading branch information
orta committed Jan 5, 2018
2 parents aabb006 + 2da2f2b commit fcded8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/commands/danger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ program

program.parse(process.argv)

if (process.env.CI) {
const showUpgradeNotice = process.env.CI && ['init', 'ci', 'process', 'pr', '--help'].some(cmd => process.argv.includes(cmd))
if (showUpgradeNotice) {
console.error("You may have updated from Danger 2.x -> 3.x without updating from `danger` to `danger ci`.")
}

0 comments on commit fcded8d

Please sign in to comment.