Soften hard exit after revert of composer file

main
Michael Telgmann 5 years ago committed by Jordi Boggiano
parent 6599f46c23
commit eee98018f7

@ -195,7 +195,7 @@ EOT
$status = $install->run(); $status = $install->run();
if ($status !== 0) { if ($status !== 0) {
$this->revertComposerFile(); $this->revertComposerFile(false);
} }
return $status; return $status;
@ -226,7 +226,7 @@ EOT
return; return;
} }
public function revertComposerFile() public function revertComposerFile($hardExit = true)
{ {
$io = $this->getIO(); $io = $this->getIO();
@ -238,6 +238,8 @@ EOT
file_put_contents($this->json->getPath(), $this->composerBackup); file_put_contents($this->json->getPath(), $this->composerBackup);
} }
if ($hardExit) {
exit(1); exit(1);
} }
}
} }

Loading…
Cancel
Save