Skip to content

Commit

Permalink
(GH-1602) exit 2 on items outdated
Browse files Browse the repository at this point in the history
When items are outdated, the exit should indicate that it is not all
good to go as there is possible work to do. A zero exit code should
only be used if choco outdated does not return any results.

- Exit of 0 indicates all up to date
- Exit of 2 indicates out of date packages
- Exit of 1 or -1 would indicate an error
  • Loading branch information
ferventcoder committed Mar 13, 2019
1 parent c18afec commit 05912e1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,11 @@ Output is package name | current version | available version | pinned?
}
}

if (oudatedPackages.Count != 0 && Environment.ExitCode == 0)
{
Environment.ExitCode = 2;
}

randomly_notify_about_pro_business(config);
}

Expand Down

0 comments on commit 05912e1

Please sign in to comment.