diff --git a/src/ncc/CLI/Main.php b/src/ncc/CLI/Main.php index 7b0a308..7c7f5a4 100644 --- a/src/ncc/CLI/Main.php +++ b/src/ncc/CLI/Main.php @@ -138,6 +138,10 @@ SourcesMenu::start(self::$args); break; + case 'version': + Console::out(sprintf('NCC version %s (%s)', NCC_VERSION_NUMBER, NCC_VERSION_BRANCH)); + break; + case '1': case 'help': HelpMenu::start(self::$args); @@ -189,8 +193,15 @@ */ public static function shutdown(): void { - RuntimeCache::clearCache(); - Functions::finalizePermissions(); + try + { + RuntimeCache::clearCache(); + Functions::finalizePermissions(); + } + catch (Exception $e) + { + Console::outWarning('An error occurred while shutting down NCC, ' . $e->getMessage()); + } } } \ No newline at end of file