Skip to content

fix: resolve spawn EINVAL on Windows by enabling shell execution#2

Open
farsh1024 wants to merge 1 commit into
XingTuLab:mainfrom
farsh1024:fix/windows-spawn-einval
Open

fix: resolve spawn EINVAL on Windows by enabling shell execution#2
farsh1024 wants to merge 1 commit into
XingTuLab:mainfrom
farsh1024:fix/windows-spawn-einval

Conversation

@farsh1024
Copy link
Copy Markdown

Fix Windows spawn EINVAL error by enabling shell execution

Problem:
When running the Web UI on Windows, the backend fails to execute the CLI command using child_process.spawn, resulting in the error “spawn EINVAL”. This prevents the deobfuscation process from running and no output files are generated.

Cause:
On Windows, .cmd files such as npm.cmd must be executed within a shell environment. Calling spawn without enabling shell execution causes the process to fail with an EINVAL error.

Solution:
Add “shell: true” to the spawn options in the runDeobfuscate function so that npm.cmd is executed correctly on Windows.

Impact:
This fix restores Web UI functionality on Windows systems. It does not affect behavior on Linux or macOS and maintains backward compatibility.

Test:
Verified that CLI usage works as expected. Verified that the Web UI can successfully execute deobfuscation and generate output files on Windows after applying the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant