fix(cli): use pathToFileURL for dynamic imports on Windows (#560)

Node's ESM loader rejects bare Windows paths (e.g. C:\...) passed to
dynamic import(), interpreting the drive letter as a URL protocol.
Convert the package-manager.js path through pathToFileURL() to produce
a valid file:// URL, matching the fix already applied to the server
import on line 628.
This commit is contained in:
plfavreau
2026-03-01 01:15:34 +02:00
committed by GitHub
parent 5257f70073
commit 7b5fd9e70c
+1 -1
View File
@@ -926,7 +926,7 @@ const commands = {
executeUpdate,
detectPackageManager,
getCurrentVersion,
} = await import(packageManagerPath);
} = await import(pathToFileURL(packageManagerPath).href);
// Check for running instances before update
let runningInstances = [];