now correctly evaluating which output
This commit is contained in:
@ -67,6 +67,6 @@ export let bashBare = (commandArg: string, retryArg: number = 2) => {
|
||||
/**
|
||||
* bashNoError allows executing stuff without throwing an error
|
||||
*/
|
||||
export let bashNoError = (commandArg: string) => {
|
||||
return bash(commandArg,-1)
|
||||
export let bashNoError = (commandArg: string): string => {
|
||||
return bash(commandArg, -1)
|
||||
}
|
||||
|
@ -30,8 +30,7 @@ export let install = (versionArg) => {
|
||||
for (let npmTool of configArg.globalNpmTools) {
|
||||
plugins.beautylog.info(`Checking for global "${npmTool}"`)
|
||||
let whichOutput = bashNoError(`which ${npmTool}`)
|
||||
console.log(whichOutput)
|
||||
let toolAvailable: boolean = !(/not\sfound/.test(whichOutput))
|
||||
let toolAvailable: boolean = !((/not\sfound/.test(whichOutput)) || whichOutput === '')
|
||||
if (toolAvailable) {
|
||||
plugins.beautylog.log(`Tool ${npmTool} is available`)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user