mirror of
https://github.com/n8n-io/n8n.git
synced 2026-09-17 17:42:47 +08:00
fix: @n8n/scan-community-package not working on Windows (#22077)
This commit is contained in:
@@ -81,6 +81,7 @@ const downloadAndExtractPackage = async (packageName, version) => {
|
||||
const npmResult = spawnSync('npm', ['-q', 'pack', `${packageName}@${version}`], {
|
||||
cwd: TEMP_DIR,
|
||||
stdio: 'pipe',
|
||||
shell: process.platform === 'win32',
|
||||
});
|
||||
if (npmResult.status !== 0) {
|
||||
throw new Error(`npm pack failed: ${npmResult.stderr?.toString()}`);
|
||||
@@ -99,6 +100,7 @@ const downloadAndExtractPackage = async (packageName, version) => {
|
||||
{
|
||||
cwd: TEMP_DIR,
|
||||
stdio: 'pipe',
|
||||
shell: process.platform === 'win32',
|
||||
},
|
||||
);
|
||||
if (tarResult.status !== 0) {
|
||||
|
||||
Reference in New Issue
Block a user