mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-20 06:07:55 +00:00
Modify handling of SIGINT in balena-dev
Change-type: patch Signed-off-by: Scott Lowe <scott@balena.io>
This commit is contained in:
parent
da652c6bce
commit
5c93df921e
@ -21,9 +21,14 @@ modifyOclifPaths();
|
|||||||
process.on('exit', function () {
|
process.on('exit', function () {
|
||||||
modifyOclifPaths(true);
|
modifyOclifPaths(true);
|
||||||
});
|
});
|
||||||
// Undo changes in case of ctrl-v
|
// Undo changes in case of ctrl-c
|
||||||
process.on('SIGINT', function () {
|
process.on('SIGINT', function () {
|
||||||
modifyOclifPaths(true);
|
modifyOclifPaths(true);
|
||||||
|
// Note process exit here will interfere with commands that do their own SIGINT handling,
|
||||||
|
// but without it commands can not be exited.
|
||||||
|
// So currently using balena-dev does not guarantee proper exit behaviour when using ctrl-c.
|
||||||
|
// Ideally a better solution is needed.
|
||||||
|
process.exit();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Use fast-boot to cache require lookups, speeding up startup
|
// Use fast-boot to cache require lookups, speeding up startup
|
||||||
|
Loading…
Reference in New Issue
Block a user