Skip to content

Commit

Permalink
Merge pull request #87 from chelkyl/fix-dry-run-fail
Browse files Browse the repository at this point in the history
fix(cli): --dry=fail should also fail when either added or removed typings
  • Loading branch information
jeffijoe authored Apr 27, 2022
2 parents 3b445b3 + 0d5589d commit c5dd49d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Oh yeah!
language: node_js

# Node 18 binaries require glibc >= 2.28
dist: focal

# Add additional versions here as appropriate.
node_js:
- 'stable'
Expand Down
3 changes: 1 addition & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ async function run(syncer: ITypeSyncer) {
)
if (
flags.dry === 'fail' &&
totals.newTypings > 0 &&
totals.removedTypings > 0
(totals.newTypings > 0 || totals.removedTypings > 0)
) {
C.error('Typings changed; check failed.')
process.exitCode = 1
Expand Down

0 comments on commit c5dd49d

Please sign in to comment.