Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

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 <benbro@microsoft.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants