From aa35865daf99134146087c10a43368b28db8d897 Mon Sep 17 00:00:00 2001 From: Timothy G Black Date: Fri, 18 Oct 2024 14:39:03 +0800 Subject: [PATCH] Attach null stdio to pass nvm-windows check https://github.com/coreybutler/nvm-windows/blob/6284f0ec44040764dc269144a3433664bf089646/src/nvm.go#L188 https://github.com/coreybutler/nvm-windows/blob/6284f0ec44040764dc269144a3433664bf089646/src/nvm.go#L73 In nvm-windows, if stdout isn't a character device, it shows an error dialog and waits for user input before terminating Attach /dev/null to make sure that nvm-windows doesn't need intervention (https://nodejs.org/api/child_process.html#optionsstdio) --- tools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools.js b/tools.js index f4b08f5..8427561 100644 --- a/tools.js +++ b/tools.js @@ -42,7 +42,7 @@ function hasNvm() { // check for existance of nvm execSync( 'nvm', - { stdio:[] } // don't care about output + { stdio: 'ignore' } // don't care about output ); } catch (e) { // no nvm,