8000 fix(cli): prevent .cmd on custom binaries by SamPoate · Pull Request #1038 · zapier/zapier-platform · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(cli): preven 8000 t .cmd on custom binaries #1038

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SamPoate
Copy link

Prevents .cmd from being added to anything like node, node.exe, or custom binaries.

// Copilots thoughts:
This pull request updates the runCommand utility function to improve compatibility and security when executing commands on Windows systems.

Compatibility improvements:

  • Updated the runCommand function in packages/cli/src/utils/misc.js to append .cmd only for specific commands (npm, npx, yarn) by introducing a conditional check. This ensures better compatibility and avoids unnecessary modifications for other commands.

Prevents .cmd from being added to anything like node, node.exe, or custom binaries.
@SamPoate SamPoate requested a review from a team as a code owner May 26, 2025 20:30
@eliangcs
Copy link
Member
eliangcs commented May 27, 2025

@SamPoate thanks for the patch! From a quick look, it seems the runCommand function is only used for npm and yarn. What’s your use case for using it with node.exe or other custom binaries?

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.

2 participants
0