@fredlackey/devutils 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -577,8 +577,20 @@ async function install_windows() {
|
|
|
577
577
|
return;
|
|
578
578
|
}
|
|
579
579
|
|
|
580
|
-
// winget failed
|
|
581
|
-
|
|
580
|
+
// winget failed - check if it's a "already installed" scenario
|
|
581
|
+
// winget returns non-zero even when the app is already installed
|
|
582
|
+
if (result.output && result.output.includes('already installed')) {
|
|
583
|
+
console.log('Google Chrome is already installed.');
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
// winget failed, log the error and try Chocolatey as fallback
|
|
588
|
+
console.log('winget installation failed:');
|
|
589
|
+
if (result.output) {
|
|
590
|
+
console.log(result.output);
|
|
591
|
+
}
|
|
592
|
+
console.log('');
|
|
593
|
+
console.log('Trying Chocolatey as fallback...');
|
|
582
594
|
}
|
|
583
595
|
|
|
584
596
|
// Try Chocolatey if available
|