Skip to content

Commit 195d6b3

Browse files
authored
Convert getPythonExecutablePath to synchronous
1 parent 24f0338 commit 195d6b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/installer/get-python.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export async function installPortablePython(destinationDir, options = {}) {
283283
* @returns {Promise<string>} Full path to Python executable
284284
* @throws {Error} If no executable found in the directory
285285
*/
286-
export async function getPythonExecutablePath(pythonDir) {
286+
function getPythonExecutablePath(pythonDir) {
287287
const executables = proc.IS_WINDOWS ? ['python.exe'] : ['python3', 'python'];
288288

289289
// Check common locations where UV might install Python
@@ -300,7 +300,7 @@ export async function getPythonExecutablePath(pythonDir) {
300300
for (const exeName of executables) {
301301
const fullPath = path.join(searchPath, exeName);
302302
try {
303-
await fs.promises.access(fullPath, fs.constants.X_OK);
303+
fs.accessSync(fullPath, fs.constants.X_OK);
304304
log('info', `Found Python executable: ${fullPath}`);
305305
return fullPath;
306306
} catch (err) {

0 commit comments

Comments
 (0)