mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 00:50:18 +01:00 
			
		
		
		
	Issue #130
This commit is contained in:
		
							parent
							
								
									03680b8271
								
							
						
					
					
						commit
						7a9495cf44
					
				@ -135,12 +135,16 @@ class Console
 | 
				
			|||||||
                        throw new Exception('You must specify an environment for this command.');
 | 
					                        throw new Exception('You must specify an environment for this command.');
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // Run the Command
 | 
				
			||||||
                $exitCode = $command->run();
 | 
					                $exitCode = $command->run();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // Check for errors
 | 
				
			||||||
                if (is_int($exitCode) && $exitCode !== 0) {
 | 
					                if (is_int($exitCode) && $exitCode !== 0) {
 | 
				
			||||||
                    throw new Exception("Command execution failed with following exit code: $exitCode.", $exitCode);
 | 
					                    throw new Exception('Command execution failed with following exit code: ' . $exitCode, $exitCode);
 | 
				
			||||||
                } elseif (is_bool($exitCode) && !$exitCode) {
 | 
					                } elseif (is_bool($exitCode) && !$exitCode) {
 | 
				
			||||||
                    $exitCode = 1;
 | 
					                    $exitCode = 1;
 | 
				
			||||||
                    throw new Exception("Command execution failed.", $exitCode);
 | 
					                    throw new Exception('Command execution failed.', $exitCode);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            } catch (Exception $exception) {
 | 
					            } catch (Exception $exception) {
 | 
				
			||||||
                self::output('<red>' . $exception->getMessage() . '</red>', 1, 2);
 | 
					                self::output('<red>' . $exception->getMessage() . '</red>', 1, 2);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user