@pacaf/wizard-ux 3.0.7 → 3.0.8
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
|
@@ -90,27 +90,51 @@ export default {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
// Python 3 (used by Dataverse-skills plugin)
|
|
93
|
+
// On Windows, `python3` may resolve to the Microsoft Store App Execution Alias stub
|
|
94
|
+
// (%LOCALAPPDATA%\Microsoft\WindowsApps\python3.exe) which exits non-zero and prints
|
|
95
|
+
// "Python was not found; run without arguments to install from the Microsoft Store..."
|
|
96
|
+
// We treat any command whose --version output doesn't start with "Python 3" as absent
|
|
97
|
+
// and fall through to the next candidate. Priority order:
|
|
98
|
+
// python3 → python → py -3 (py launcher is Windows-only)
|
|
99
|
+
function tryPythonCmd(cmd) {
|
|
100
|
+
const raw = tryRun(`${cmd} --version`) || '';
|
|
101
|
+
// Store stub returns empty (non-zero exit trapped by tryRun) or the "not found" message
|
|
102
|
+
if (!raw.startsWith('Python 3')) return null;
|
|
103
|
+
return raw.replace('Python ', '').trim();
|
|
104
|
+
}
|
|
105
|
+
|
|
93
106
|
let pythonCmd = null;
|
|
94
|
-
|
|
95
|
-
|
|
107
|
+
let pythonVersion = null;
|
|
108
|
+
|
|
109
|
+
const candidates = ['python3', 'python'];
|
|
110
|
+
if (platform() === 'win32') candidates.push('py');
|
|
111
|
+
|
|
112
|
+
for (const candidate of candidates) {
|
|
113
|
+
if (!hasCommand(candidate)) continue;
|
|
114
|
+
const ver = candidate === 'py' ? tryRun('py -3 --version')?.replace('Python ', '').trim() || null
|
|
115
|
+
: tryPythonCmd(candidate);
|
|
116
|
+
if (ver) {
|
|
117
|
+
pythonCmd = candidate === 'py' ? 'py' : candidate;
|
|
118
|
+
pythonVersion = ver;
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
96
122
|
|
|
97
123
|
if (pythonCmd) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
124
|
+
checks.push({ name: 'Python', ok: true, value: pythonVersion, hint: null });
|
|
125
|
+
log.ok(`Python ${pythonVersion}${pythonCmd === 'py' ? ' (via py launcher)' : ''}`);
|
|
126
|
+
} else {
|
|
127
|
+
const winHint = platform() === 'win32'
|
|
128
|
+
? ' On Windows, ensure "Add python.exe to PATH" was checked during install, or disable the Microsoft Store python3 alias in Settings → Apps → Advanced app settings → App execution aliases.'
|
|
129
|
+
: '';
|
|
130
|
+
checks.push({ name: 'Python', ok: false, value: null, hint: `Required for Dataverse-skills plugin (https://www.python.org/downloads/).${winHint}` });
|
|
131
|
+
log.warn('Python 3 — not found (required for Dataverse-skills plugin)');
|
|
132
|
+
if (platform() === 'win32') {
|
|
133
|
+
log.info(' → Install Python 3 from https://www.python.org/downloads/ — check "Add python.exe to PATH"');
|
|
134
|
+
log.info(' → Or disable the Store stub: Settings → Apps → Advanced app settings → App execution aliases → turn off python3.exe');
|
|
103
135
|
} else {
|
|
104
|
-
checks.push({ name: 'Python', ok: false, value: pyVer, hint: 'Python 3+ required for Dataverse-skills plugin (https://www.python.org/downloads/)' });
|
|
105
|
-
log.warn(`Python ${pyVer} — Python 3+ required for Dataverse-skills plugin`);
|
|
106
136
|
log.info(' → Install Python 3: https://www.python.org/downloads/');
|
|
107
|
-
log.info(' → Then re-run this step to verify');
|
|
108
|
-
pythonCmd = null;
|
|
109
137
|
}
|
|
110
|
-
} else {
|
|
111
|
-
checks.push({ name: 'Python', ok: false, value: null, hint: 'Required for Dataverse-skills plugin (https://www.python.org/downloads/)' });
|
|
112
|
-
log.warn('Python 3 — not found (required for Dataverse-skills plugin)');
|
|
113
|
-
log.info(' → Install Python 3: https://www.python.org/downloads/');
|
|
114
138
|
log.info(' → Then re-run this step to verify');
|
|
115
139
|
}
|
|
116
140
|
|