Skip to content

Revert usage of cmd on Windows - #109

Open
axel3rd wants to merge 1 commit into
codehaus-plexus:masterfrom
axel3rd:update-41-Revert_usage_of_cmd_on_Windows
Open

axel3rd wants to merge 1 commit into
codehaus-plexus:masterfrom
axel3rd:update-41-Revert_usage_of_cmd_on_Windows

Conversation

@axel3rd

@axel3rd axel3rd commented Dec 21, 2020 •

Copy link
Copy Markdown
Contributor

This PR is an update of old previous staling PR #41


cf. #17 (comments from May 2018): Revert the usage of cmd.exe (on Windows), because prevents the destroy/kill launched by this way when CTRL+C.

For history: This Windows shell specific is removed since plexus-utils 3.0.15, except for 3.1.0.

On Windows, the usage of cmd builtin (like echo) or .cmd / .bat on PATH should be implemented by the client/user.


Another approach could be a dedicated option: See #110

@axel3rd
axel3rd marked this pull request as draft December 21, 2020 11:30
@axel3rd
axel3rd force-pushed the update-41-Revert_usage_of_cmd_on_Windows branch from 965bed7 to 6168f2b Compare December 21, 2020 11:32
@axel3rd
axel3rd force-pushed the update-41-Revert_usage_of_cmd_on_Windows branch from 6168f2b to 5f9a5ec Compare December 21, 2020 13:05
@axel3rd
axel3rd marked this pull request as ready for review December 21, 2020 13:25
@axel3rd

axel3rd commented Dec 21, 2020

Copy link
Copy Markdown
Contributor Author

Note: GitHub action verify problem with Java 16-ea is not part of this PR.

@axel3rd
axel3rd requested a review from michael-o January 4, 2021 11:48
@axel3rd

axel3rd commented Jan 4, 2021

Copy link
Copy Markdown
Contributor Author

(@michael-o: Requested changes have been done)

@axel3rd

axel3rd commented Jan 4, 2021

Copy link
Copy Markdown
Contributor Author

Note: GitHub action verify problem with Java 16-ea is not part of this PR.

See #116

@axel3rd

axel3rd commented Feb 26, 2021

Copy link
Copy Markdown
Contributor Author

Is this PR (or #110) not relevant 😢 ?

@michael-o
michael-o removed their request for review October 23, 2022 08:59
@slachiewicz
slachiewicz marked this pull request as draft January 5, 2025 10:44
@slachiewicz slachiewicz added need-rebase Branch has conflicts and needs a rebase before it can merge enhancement New feature or request labels Aug 16, 2026
@axel3rd
axel3rd force-pushed the update-41-Revert_usage_of_cmd_on_Windows branch 2 times, most recently from 5b90f41 to 5c05119 Compare August 16, 2026 21:36
@axel3rd
axel3rd marked this pull request as ready for review August 16, 2026 21:39
@axel3rd
axel3rd requested a review from michael-o August 16, 2026 21:39
@axel3rd

axel3rd commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

@slachiewicz Rebase this PR after closing #110

@slachiewicz slachiewicz removed the need-rebase Branch has conflicts and needs a rebase before it can merge label Aug 17, 2026
@axel3rd
axel3rd force-pushed the update-41-Revert_usage_of_cmd_on_Windows branch from 5c05119 to 436fb68 Compare August 17, 2026 21:10
@axel3rd
axel3rd requested a review from michael-o August 17, 2026 21:13

@michael-o michael-o left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@slachiewicz WDYT?

This comment was marked as resolved.

@slachiewicz

Copy link
Copy Markdown
Member

Checked against current master:

  • Still relevant: Commandline.getCommandline() still wraps every Windows command in cmd.exe.
  • The "removed since 3.0.15, except for 3.1.0" note no longer holds: the wrapper is in every release from 3.1.0 to 4.1.0. Merging this changes long-released behaviour and brings back Binary PATH execution regression on Windows (since 3.0.15) #17 (extensionless scripts such as mvn rather than mvn.cmd fail with CreateProcess error=2), so it belongs in a minor or major release with a breaking label, not in 4.1.x.
  • CI ran on a base 19 commits behind master. Please rebase so the Windows job runs against current master.
  • Smaller points: toString() still prints the cmd.exe /X /D /C wrapper that is no longer executed; getCommandline() is still called in one place where the raw form is used next to it; the Windows branch of CommandlineTest.execute() passes Hello twice; the three Copilot comments are open.

@axel3rd
axel3rd force-pushed the update-41-Revert_usage_of_cmd_on_Windows branch from 66dfeac to 723e794 Compare November 15, 2026 18:34
@axel3rd

axel3rd commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

Hi @slachiewicz, rebase done and comments/suggestions applied (except one, not agree with it).

@michael-o michael-o left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slachiewicz WDYT?

@slachiewicz

Copy link
Copy Markdown
Member

Check also
#353

We will probably break something but in worst case we can fix it here or in projects

This branch has not been deployed

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants