Skip to content
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

fix: use shell: true on windows so cmd aliases work #6742

Merged
merged 3 commits into from
Apr 9, 2021
Merged

Conversation

joshgummersall
Copy link
Contributor

@joshgummersall joshgummersall commented Apr 7, 2021

When running a command on windows, shell: true must be used so
alias.cmd can be just invoked as alias. This will ensure that
template and generator authors do not need Windows-specific logic.

#minor

When running a command on windows, `shell: true` must be used so
`alias.cmd` can be just invoked as `alias`. This will ensure that
template and generator authors do not need Windows-specific logic.
@joshgummersall
Copy link
Contributor Author

Note: https://nodejs.org/api/child_process.html#child_process_default_windows_shell mentions some special considerations when invoking commands as a shell that can lead to arbitrary command execution. Technically, Composer already executes an arbitrary command for a particular runtime, so I'm not sure if this needs to be handled specially.

@joshgummersall joshgummersall changed the title use shell: true on windows so cmd aliases work fix: use shell: true on windows so cmd aliases work Apr 7, 2021
@coveralls
Copy link

coveralls commented Apr 7, 2021

Coverage Status

Coverage remained the same at 51.154% when pulling 6e9cb99 on jpg/fix-win-shell into ddc2a67 on main.

@cwhitten cwhitten added this to the R13 milestone Apr 7, 2021
@benbrown benbrown merged commit 31d20ac into main Apr 9, 2021
@benbrown benbrown deleted the jpg/fix-win-shell branch April 9, 2021 21:21
@cwhitten cwhitten mentioned this pull request May 20, 2021
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
When running a command on windows, `shell: true` must be used so
`alias.cmd` can be just invoked as `alias`. This will ensure that
template and generator authors do not need Windows-specific logic.

Co-authored-by: Ben Brown <[email protected]>
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.

5 participants