@pnpm/env.system-node-version
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,2 +0,2 @@ | ||
export declare function getSystemNodeVersionNonCached(): string; | ||
export declare function getSystemNodeVersionNonCached(): string | undefined; | ||
export declare const getSystemNodeVersion: typeof getSystemNodeVersionNonCached; |
@@ -36,3 +36,9 @@ "use strict"; | ||
if ((0, cli_meta_1.detectIfCurrentPkgIsExecutable)()) { | ||
return execa.sync('node', ['--version']).stdout.toString(); | ||
try { | ||
return execa.sync('node', ['--version']).stdout.toString(); | ||
} | ||
catch { | ||
// Node.js is not installed on the system | ||
return undefined; | ||
} | ||
} | ||
@@ -39,0 +45,0 @@ return process.version; |
{ | ||
"name": "@pnpm/env.system-node-version", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Detects the current system node version", | ||
@@ -32,3 +32,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@pnpm/env.system-node-version": "1.0.0" | ||
"@pnpm/env.system-node-version": "1.0.1" | ||
}, | ||
@@ -35,0 +35,0 @@ "exports": { |
Sorry, the diff of this file is not supported yet
5205
48