Merge pull request #4133 from benbor/added-ctrl-c
Added Ctrl+C support to create-project command for unix-like systemspull/4136/head
commit
24168d9d5c
|
@ -290,6 +290,16 @@ EOT
|
||||||
$directory = getcwd() . DIRECTORY_SEPARATOR . array_pop($parts);
|
$directory = getcwd() . DIRECTORY_SEPARATOR . array_pop($parts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// handler Ctrl+C for unix-like systems
|
||||||
|
if (function_exists('pcntl_signal')) {
|
||||||
|
declare(ticks = 100);
|
||||||
|
pcntl_signal(SIGINT, function() use ($directory) {
|
||||||
|
$fs = new Filesystem();
|
||||||
|
$fs->removeDirectory($directory);
|
||||||
|
exit(130);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
$io->writeError('<info>Installing ' . $package->getName() . ' (' . VersionParser::formatVersion($package, false) . ')</info>');
|
$io->writeError('<info>Installing ' . $package->getName() . ' (' . VersionParser::formatVersion($package, false) . ')</info>');
|
||||||
|
|
||||||
if ($disablePlugins) {
|
if ($disablePlugins) {
|
||||||
|
|
Loading…
Reference in New Issue