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:
@@ -926,7 +926,7 @@ const commands = {
|
|||||||
executeUpdate,
|
executeUpdate,
|
||||||
detectPackageManager,
|
detectPackageManager,
|
||||||
getCurrentVersion,
|
getCurrentVersion,
|
||||||
} = await import(packageManagerPath);
|
} = await import(pathToFileURL(packageManagerPath).href);
|
||||||
|
|
||||||
// Check for running instances before update
|
// Check for running instances before update
|
||||||
let runningInstances = [];
|
let runningInstances = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user