Skip to content

occ commands are not exiting with error status after symfony/console 3.4.16 update #32978

@phil-davis

Description

@phil-davis

See issue raised with the symfony project: symfony/symfony#28695

Steps to reproduce

  1. have ownCloud installed with symfony/console 3.4.15 e.g.:
git checkout v10.0.10
  1. run some symfony console occ command in a way that gives an error, e.g. an example ownCloud console command:
php occ user:add aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Enter password: 
Confirm password: 

In Manager.php line 355:
                                                     
  The username can not be longer than 64 characters  

user:add [--password-from-env] [--display-name [DISPLAY-NAME]] [--email [EMAIL]] [-g|--group [GROUP]] [--] <uid>

$ echo $?
1
  1. update to symfony/console 3.4.16
composer update symfony/console
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Updating symfony/console (v3.4.15 => v3.4.16): Loading from cache
Writing lock file
Generating optimized autoload files
  1. repeat the console command:
php occ user:add aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Enter password: 
Confirm password: 

In Manager.php line 355:
                                                     
  The username can not be longer than 64 characters  

user:add [--password-from-env] [--display-name [DISPLAY-NAME]] [--email [EMAIL]] [-g|--group [GROUP]] [--] <uid>

$ echo $?
0

Expected behaviour

Exit status should be 1

Actual behaviour

Exit status is 0

Server configuration

Operating system:
Ubuntu 18.04

Web server:
Development environment

Database:
mySQL

PHP version:
5.6.38 7.1.22 and 7.2.10 all show the same problem.

ownCloud version: (see ownCloud admin page)
core stable10 with recent symfony/console bump to 3.4.16

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions