Merge "shell: Deduplicate code in Command.php by combining else paths"