Skip to content

[stable25] Add option to return an exit-code when occ status signals an update is needed#36218

Merged
nickvergessen merged 3 commits intostable25from
backport/35873/stable25
Feb 24, 2023
Merged

[stable25] Add option to return an exit-code when occ status signals an update is needed#36218
nickvergessen merged 3 commits intostable25from
backport/35873/stable25

Conversation

@backportbot-nextcloud
Copy link

backport of #35873

Lee Garrett and others added 3 commits January 18, 2023 13:50
Running `./occ status -e` will produce any output. However, it will:

exit 0 during normal operation,
exit 1 when in maintenance mode,
exit 2 when `./occ upgrade` is needed.

Signed-off-by: Lee Garrett <lgarrett@rocketjump.eu>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Comment on lines +73 to +75
if ($input->getOption('verbose') || !$input->getOption('exit-code')) {
$this->writeArrayInOutputFormat($input, $output, $values);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do I oversee something? Previously it was outputted independent of the verbose setting, but this changed now. I'd consider it a behavioral change which is not OK for a backport.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but default is !exit-code so the old behaviour persists

@blizzz
Copy link
Member

blizzz commented Feb 9, 2023

moving to 25.0.5

@nickvergessen nickvergessen added the 3. to review Waiting for reviews label Feb 24, 2023
@nickvergessen
Copy link
Member

@leegarrett want to approve the backport?

@leegarrett leegarrett self-requested a review February 24, 2023 11:52
@nickvergessen nickvergessen merged commit bbcfa69 into stable25 Feb 24, 2023
@nickvergessen nickvergessen deleted the backport/35873/stable25 branch February 24, 2023 13:01
@blizzz blizzz mentioned this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants