Fix CTRL+C handling during create-project
parent
20699905ab
commit
251a347efb
|
@ -319,13 +319,16 @@ EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
// handler Ctrl+C for unix-like systems
|
// handler Ctrl+C for unix-like systems
|
||||||
if (function_exists('pcntl_signal')) {
|
if (function_exists('pcntl_async_signals')) {
|
||||||
declare(ticks=100);
|
@mkdir($directory, 0777, true);
|
||||||
pcntl_signal(SIGINT, function () use ($directory) {
|
if ($realDir = realpath($directory)) {
|
||||||
$fs = new Filesystem();
|
pcntl_async_signals(true);
|
||||||
$fs->removeDirectory($directory);
|
pcntl_signal(SIGINT, function () use ($realDir) {
|
||||||
exit(130);
|
$fs = new Filesystem();
|
||||||
});
|
$fs->removeDirectory($realDir);
|
||||||
|
exit(130);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$io->writeError('<info>Installing ' . $package->getName() . ' (' . $package->getFullPrettyVersion(false) . ')</info>');
|
$io->writeError('<info>Installing ' . $package->getName() . ' (' . $package->getFullPrettyVersion(false) . ')</info>');
|
||||||
|
|
Loading…
Reference in New Issue