Skip to content

fix: use /c instead of -c on windows in postinstall hook#6397

Merged
jdx merged 1 commit intojdx:mainfrom
risu729:win-cmd-c-flag
Sep 24, 2025
Merged

fix: use /c instead of -c on windows in postinstall hook#6397
jdx merged 1 commit intojdx:mainfrom
risu729:win-cmd-c-flag

Conversation

@risu729
Copy link
Contributor

@risu729 risu729 commented Sep 24, 2025

Fixes #6388

Copilot AI review requested due to automatic review settings September 24, 2025 13:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes shell command execution on Windows by replacing hardcoded "-c" flags with a platform-specific constant. The change ensures proper shell command execution across different operating systems by using "/c" on Windows and "-c" on Unix systems.

  • Introduces platform-specific shell command flag constants
  • Refactors hardcoded shell command flags to use the new constants
  • Consolidates shell command flag logic in a central location

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/env.rs Defines platform-specific shell command flag constants
src/cli/exec.rs Updates command parsing to use the new shell command flag constant
src/backend/mod.rs Replaces hardcoded "-c" with the platform-specific constant

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jdx
Copy link
Owner

jdx commented Sep 24, 2025

bugbot run

@jdx jdx merged commit 69e6134 into jdx:main Sep 24, 2025
19 checks passed
@jdx jdx mentioned this pull request Sep 24, 2025
jdx added a commit that referenced this pull request Sep 25, 2025
### 📦 Registry

- replace amplify-cli github backend with ubi by @eggplants in
[#6396](#6396)

### 🚀 Features

- **(template)** add read_file() function by @jdx in
[#6400](#6400)

### 🐛 Bug Fixes

- **(aqua)** support github_artifact_attestations.enabled by @risu729 in
[#6372](#6372)
- use /c instead of -c on windows in postinstall hook by @risu729 in
[#6397](#6397)

### 🧪 Testing

- **(test-tool)** uninstall all versions and clear cache before
installation by @jdx in [#6393](#6393)

### New Contributors

- @eggplants made their first contribution in
[#6396](#6396)

Co-authored-by: mise-en-dev <release@mise.jdx.dev>
@jdx jdx mentioned this pull request Sep 25, 2025
@risu729 risu729 deleted the win-cmd-c-flag branch September 25, 2025 03:22
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Sep 25, 2025
## [2025.9.18](https://github.com/jdx/mise/compare/v2025.9.17..v2025.9.18) - 2025-09-24

### 📦 Registry

- replace amplify-cli github backend with ubi by @eggplants in [#6396](jdx/mise#6396)

### 🚀 Features

- **(template)** add read_file() function by @jdx in [#6400](jdx/mise#6400)

### 🐛 Bug Fixes

- **(aqua)** support github_artifact_attestations.enabled by @risu729 in [#6372](jdx/mise#6372)
- use /c instead of -c on windows in postinstall hook by @risu729 in [#6397](jdx/mise#6397)

### 🧪 Testing

- **(test-tool)** uninstall all versions and clear cache before installation by @jdx in [#6393](jdx/mise#6393)

### New Contributors

- @eggplants made their first contribution in [#6396](jdx/mise#6396)

## [2025.9.17](https://github.com/jdx/mise/compare/v2025.9.16..v2025.9.17) - 2025-09-24

### 🚀 Features

- **(java)** add support for Liberica NIK releases by @roele in [#6382](jdx/mise#6382)

### 🐛 Bug Fixes

- **(toolset)** handle underflow in version_sub function by @koh-sh in [#6389](jdx/mise#6389)

### 📚 Documentation

- document MISE_ENV behavior for global/system configs by @jdx in [#6385](jdx/mise#6385)

### New Contributors

- @jc00ke made their first contribution in [#6386](jdx/mise#6386)
- @koh-sh made their first contribution in [#6389](jdx/mise#6389)
riastradh pushed a commit to riastradh/pkgsrc-test20250901 that referenced this pull request Feb 8, 2026
## [2025.9.18](https://github.com/jdx/mise/compare/v2025.9.17..v2025.9.18) - 2025-09-24

### 📦 Registry

- replace amplify-cli github backend with ubi by @eggplants in [#6396](jdx/mise#6396)

### 🚀 Features

- **(template)** add read_file() function by @jdx in [#6400](jdx/mise#6400)

### 🐛 Bug Fixes

- **(aqua)** support github_artifact_attestations.enabled by @risu729 in [#6372](jdx/mise#6372)
- use /c instead of -c on windows in postinstall hook by @risu729 in [#6397](jdx/mise#6397)

### 🧪 Testing

- **(test-tool)** uninstall all versions and clear cache before installation by @jdx in [#6393](jdx/mise#6393)

### New Contributors

- @eggplants made their first contribution in [#6396](jdx/mise#6396)

## [2025.9.17](https://github.com/jdx/mise/compare/v2025.9.16..v2025.9.17) - 2025-09-24

### 🚀 Features

- **(java)** add support for Liberica NIK releases by @roele in [#6382](jdx/mise#6382)

### 🐛 Bug Fixes

- **(toolset)** handle underflow in version_sub function by @koh-sh in [#6389](jdx/mise#6389)

### 📚 Documentation

- document MISE_ENV behavior for global/system configs by @jdx in [#6385](jdx/mise#6385)

### New Contributors

- @jc00ke made their first contribution in [#6386](jdx/mise#6386)
- @koh-sh made their first contribution in [#6389](jdx/mise#6389)
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.

3 participants