@xaidenlabs/uso 1.0.1 → 1.0.2
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 +1 -1
- package/src/platforms/windows.js +9 -4
package/package.json
CHANGED
package/src/platforms/windows.js
CHANGED
|
@@ -50,14 +50,16 @@ const installWindows = async (shouldInstallRust, shouldInstallSolana) => {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
// Try regular install first
|
|
53
|
+
// Try regular install first (Silently to catch 1314 error without scaring user)
|
|
53
54
|
log.info(" Running Solana Installer...");
|
|
54
|
-
const installResult = shell.exec('solana-install.exe stable');
|
|
55
|
+
const installResult = shell.exec('solana-install.exe stable', { silent: true });
|
|
55
56
|
|
|
56
57
|
// Check for Symlink Error (1314) for potential auto-elevation
|
|
57
58
|
if (installResult.code !== 0) {
|
|
58
59
|
const output = installResult.stderr + installResult.stdout;
|
|
60
|
+
|
|
59
61
|
if (output.includes("os error 1314")) {
|
|
60
|
-
log.
|
|
62
|
+
log.info("ℹ️ Privilege escalation required for symlinks.");
|
|
61
63
|
log.info("🛡️ Triggering Run as Administrator (UAC)...");
|
|
62
64
|
log.info("👉 Please click 'Yes' in the popup window to allow the installer.");
|
|
63
65
|
|
|
@@ -70,18 +72,21 @@ const installWindows = async (shouldInstallRust, shouldInstallSolana) => {
|
|
|
70
72
|
|
|
71
73
|
if (elevatedRun.code === 0) {
|
|
72
74
|
// We can't easily capture stdout from the spawned high-privilege window,
|
|
73
|
-
// so we assume success if the process exited cleanly
|
|
74
|
-
// A basic verification: check if we can run solana
|
|
75
|
+
// so we assume success if the process exited cleanly.
|
|
75
76
|
log.success("✅ Solana Installer finished (Elevated).");
|
|
76
77
|
} else {
|
|
77
78
|
log.error("❌ Elevated installation failed or was cancelled.");
|
|
78
79
|
return false;
|
|
79
80
|
}
|
|
80
81
|
} else {
|
|
82
|
+
// It failed for some other reason, so WE MUST show the output now
|
|
83
|
+
console.error(output);
|
|
81
84
|
log.error("❌ Solana CLI installation failed.");
|
|
82
85
|
// Don't return false hard here as we might want to continue, but usually this is fatal
|
|
83
86
|
}
|
|
84
87
|
} else {
|
|
88
|
+
// Success on first try
|
|
89
|
+
console.log(installResult.stdout); // Show success output if any relevant
|
|
85
90
|
log.success("✅ Solana CLI installed.");
|
|
86
91
|
}
|
|
87
92
|
|