Loading CHANGES.md +9 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,15 @@ Version 1.8.14 To be released. ### @fedify/cli - Fixed `fedify` command failing on Windows with `PermissionDenied` error when trying to locate or execute package managers during initialization. The CLI now properly handles _\*.cmd_ and _\*.bat_ files on Windows by invoking them through `cmd /c`. [[#463]] [#463]: https://github.com/fedify-dev/fedify/issues/463 Version 1.8.13 -------------- Loading packages/cli/src/init.ts +42 −18 Original line number Diff line number Diff line Loading @@ -1437,7 +1437,12 @@ async function isCommandAvailable( "The command {command} failed with the error: {error}", { command: checkCommand, error }, ); if (error instanceof Deno.errors.NotFound) return false; if ( error instanceof Deno.errors.NotFound || error instanceof Deno.errors.PermissionDenied ) { return false; } throw error; } } Loading @@ -1454,11 +1459,13 @@ async function locatePackageManager( } if (Deno.build.os !== "windows") return undefined; const cmd: [string, ...string[]] = [ "cmd", "/c", packageManagers[pm].checkCommand[0] + ".cmd", ...packageManagers[pm].checkCommand.slice(1), ]; if (await isCommandAvailable({ ...packageManagers[pm], checkCommand: cmd })) { return cmd[0]; return cmd[2]; } return undefined; } Loading @@ -1485,7 +1492,24 @@ async function addDependencies( }` ); if (deps.length < 1) return; const cmd = new Deno.Command( const cmd = runtime === "node" && packageManagerLocations[pm]?.match(/\.cmd$/i) ? new Deno.Command( "cmd", { args: [ "/c", `${packageManagerLocations[pm]} add ${ dev ? (pm === "yarn" ? "--dev" : "--save-dev") : "" } ${uniqueArray(deps).join(" ")}`, ], cwd: dir, stdin: "inherit", stdout: "inherit", stderr: "inherit", }, ) : new Deno.Command( runtime === "node" ? (packageManagerLocations[pm] ?? pm) : runtime, { args: [ Loading Loading
CHANGES.md +9 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,15 @@ Version 1.8.14 To be released. ### @fedify/cli - Fixed `fedify` command failing on Windows with `PermissionDenied` error when trying to locate or execute package managers during initialization. The CLI now properly handles _\*.cmd_ and _\*.bat_ files on Windows by invoking them through `cmd /c`. [[#463]] [#463]: https://github.com/fedify-dev/fedify/issues/463 Version 1.8.13 -------------- Loading
packages/cli/src/init.ts +42 −18 Original line number Diff line number Diff line Loading @@ -1437,7 +1437,12 @@ async function isCommandAvailable( "The command {command} failed with the error: {error}", { command: checkCommand, error }, ); if (error instanceof Deno.errors.NotFound) return false; if ( error instanceof Deno.errors.NotFound || error instanceof Deno.errors.PermissionDenied ) { return false; } throw error; } } Loading @@ -1454,11 +1459,13 @@ async function locatePackageManager( } if (Deno.build.os !== "windows") return undefined; const cmd: [string, ...string[]] = [ "cmd", "/c", packageManagers[pm].checkCommand[0] + ".cmd", ...packageManagers[pm].checkCommand.slice(1), ]; if (await isCommandAvailable({ ...packageManagers[pm], checkCommand: cmd })) { return cmd[0]; return cmd[2]; } return undefined; } Loading @@ -1485,7 +1492,24 @@ async function addDependencies( }` ); if (deps.length < 1) return; const cmd = new Deno.Command( const cmd = runtime === "node" && packageManagerLocations[pm]?.match(/\.cmd$/i) ? new Deno.Command( "cmd", { args: [ "/c", `${packageManagerLocations[pm]} add ${ dev ? (pm === "yarn" ? "--dev" : "--save-dev") : "" } ${uniqueArray(deps).join(" ")}`, ], cwd: dir, stdin: "inherit", stdout: "inherit", stderr: "inherit", }, ) : new Deno.Command( runtime === "node" ? (packageManagerLocations[pm] ?? pm) : runtime, { args: [ Loading