if !isTerminal() {
alert("NVM for Windows should be run from a terminal such as CMD or PowerShell.", "Terminal Only")
os.Exit(0)
}
// Capture any additional arguments
if len(args) > 2 {
detail = args[2]
@@ -180,6 +185,102 @@ func setNpmMirror(uri string) {
saveSettings()
}
func isTerminal() bool {
fileInfo, err := os.Stdout.Stat()
if err != nil {
return false
}
return (fileInfo.Mode() & os.ModeCharDevice) != 0
}
请问我可以绕开这个检测吗
nvm, Nodejs, fileinfo, isterminal