Skip to content

fix(gem): revert gem.rs script newline change#8034

Merged
jdx merged 1 commit intojdx:mainfrom
my1e5:gem-newline-revert
Feb 6, 2026
Merged

fix(gem): revert gem.rs script newline change#8034
jdx merged 1 commit intojdx:mainfrom
my1e5:gem-newline-revert

Conversation

@my1e5
Copy link
Contributor

@my1e5 my1e5 commented Feb 6, 2026

Sorry, I should have checked that suggestion (#8031 (comment)) by Copilot more carefully. The newline it suggested should be added causes '\n' is not recognized as an internal or external command, operable program or batch file.:

$ ./mise.exe x -- ceedling --version

C:\Users\my1e5\Projects\mise-project>\n
'\n' is not recognized as an internal or external command,
operable program or batch file.
Welcome to Ceedling!

  Ceedling => 1.0.1-fb1ce6c
  ----------------------
  C:/Users/my1e5/AppData/Local/mise/installs/gem-ceedling/1.0.1/libexec/gems/ceedling-1.0.1/
  
  Build Frameworks
  ----------------------
       CMock => 2.6.0
       Unity => 2.6.1
  CException => 1.3.4

This PR reverts that change.

Removed unnecessary newline in gem.rs.
Copilot AI review requested due to automatic review settings February 6, 2026 16:53
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @my1e5, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a regression introduced in a previous change, where an extraneous newline character was added to a Windows batch script template. The presence of this character caused execution failures on Windows systems. This PR rectifies the issue by removing the problematic newline, restoring proper functionality for RubyGems on Windows.

Highlights

  • Revert Newline Character: This pull request reverts an accidental newline character (\n) that was introduced in the src/backend/gem.rs file. This newline was causing issues on Windows when executing gem scripts, leading to an error where \n was not recognized as a command.
  • Windows Compatibility Fix: The change specifically addresses a regression that affected Windows environments, ensuring that generated batch scripts for RubyGems execute correctly without parsing errors.
Changelog
  • src/backend/gem.rs
    • Removed an erroneous newline character (\n) from the formatdoc! macro used to generate Windows batch scripts, resolving execution errors.
Activity
  • The author identified a regression in Windows environments caused by a previously merged change, which was based on a Copilot suggestion.
  • The author created this pull request to revert the specific change that introduced the problematic newline character, demonstrating a quick self-correction to fix the bug.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request reverts a change that incorrectly added a literal \n and a newline to the beginning of the Windows gem wrapper script. As described in the pull request, this caused an error on Windows where \n was interpreted as a command. This fix removes the erroneous characters, ensuring the batch script starts correctly with @echo off. The change is correct and resolves the bug.

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

Reverts an accidental change to the Windows .cmd wrapper script generation for the gem backend that introduced a literal \n at the start of the script, which breaks execution on Windows ('\n' is not recognized as a command).

Changes:

  • Remove the literal \n prefix from the generated Windows .cmd wrapper script content.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jdx jdx merged commit 794d682 into jdx:main Feb 6, 2026
39 of 40 checks passed
mise-en-dev added a commit that referenced this pull request Feb 7, 2026
### 🚀 Features

- **(env)** add shell-style variable expansion in env values by @jdx in
[#8029](#8029)
- **(list)** add --all-sources flag to list command by @TylerHillery in
[#8019](#8019)

### 🐛 Bug Fixes

- **(gem)** Windows support for gem backend by @my1e5 in
[#8031](#8031)
- **(gem)** revert gem.rs script newline change by @my1e5 in
[#8034](#8034)
- **(lock)** write tools to lockfile matching their source config by
@jdx in [#8012](#8012)
- **(ls)** sort sources deterministically in --all-sources output by
@jdx in [#8037](#8037)
- **(task)** auto-install tools from mise.toml for file tasks by @jdx in
[#8030](#8030)

### 📚 Documentation

- fix wrong positions of `mise run` flags by @muzimuzhi in
[#8036](#8036)

### 📦️ Dependency Updates

- update ghcr.io/jdx/mise:copr docker digest to 3e00d7d by
@renovate[bot] in [#8023](#8023)
- update ghcr.io/jdx/mise:alpine docker digest to 0ced1b3 by
@renovate[bot] in [#8022](#8022)

### 📦 Registry

- add tirith
([github:sheeki03/tirith](https://github.com/sheeki03/tirith)) by
@sheeki03 in [#8024](#8024)
- add mas by @TyceHerrman in
[#8032](#8032)

### Security

- **(deps)** update time crate to 0.3.47 to fix RUSTSEC-2026-0009 by
@jdx in [#8026](#8026)

### New Contributors

- @sheeki03 made their first contribution in
[#8024](#8024)
- @TylerHillery made their first contribution in
[#8019](#8019)

## 📦 Aqua Registry Updates

#### New Packages (1)

-
[`kubernetes-sigs/kubectl-validate`](https://github.com/kubernetes-sigs/kubectl-validate)

#### Updated Packages (6)

-
[`flux-iac/tofu-controller/tfctl`](https://github.com/flux-iac/tofu-controller/tfctl)
- [`gogs/gogs`](https://github.com/gogs/gogs)
- [`j178/prek`](https://github.com/j178/prek)
- [`syncthing/syncthing`](https://github.com/syncthing/syncthing)
- [`tuist/tuist`](https://github.com/tuist/tuist)
- [`yaml/yamlscript`](https://github.com/yaml/yamlscript)
lucasew pushed a commit to lucasew/CONTRIB-mise that referenced this pull request Feb 18, 2026
Sorry, I should have checked that suggestion
(jdx#8031 (comment)) by
Copilot more carefully. The newline it suggested should be added causes
`'\n' is not recognized as an internal or external command, operable
program or batch file.`:
```
$ ./mise.exe x -- ceedling --version

C:\Users\my1e5\Projects\mise-project>\n
'\n' is not recognized as an internal or external command,
operable program or batch file.
Welcome to Ceedling!

  Ceedling => 1.0.1-fb1ce6c
  ----------------------
  C:/Users/my1e5/AppData/Local/mise/installs/gem-ceedling/1.0.1/libexec/gems/ceedling-1.0.1/
  
  Build Frameworks
  ----------------------
       CMock => 2.6.0
       Unity => 2.6.1
  CException => 1.3.4
```
This PR reverts that change.
lucasew pushed a commit to lucasew/CONTRIB-mise that referenced this pull request Feb 18, 2026
### 🚀 Features

- **(env)** add shell-style variable expansion in env values by @jdx in
[jdx#8029](jdx#8029)
- **(list)** add --all-sources flag to list command by @TylerHillery in
[jdx#8019](jdx#8019)

### 🐛 Bug Fixes

- **(gem)** Windows support for gem backend by @my1e5 in
[jdx#8031](jdx#8031)
- **(gem)** revert gem.rs script newline change by @my1e5 in
[jdx#8034](jdx#8034)
- **(lock)** write tools to lockfile matching their source config by
@jdx in [jdx#8012](jdx#8012)
- **(ls)** sort sources deterministically in --all-sources output by
@jdx in [jdx#8037](jdx#8037)
- **(task)** auto-install tools from mise.toml for file tasks by @jdx in
[jdx#8030](jdx#8030)

### 📚 Documentation

- fix wrong positions of `mise run` flags by @muzimuzhi in
[jdx#8036](jdx#8036)

### 📦️ Dependency Updates

- update ghcr.io/jdx/mise:copr docker digest to 3e00d7d by
@renovate[bot] in [jdx#8023](jdx#8023)
- update ghcr.io/jdx/mise:alpine docker digest to 0ced1b3 by
@renovate[bot] in [jdx#8022](jdx#8022)

### 📦 Registry

- add tirith
([github:sheeki03/tirith](https://github.com/sheeki03/tirith)) by
@sheeki03 in [jdx#8024](jdx#8024)
- add mas by @TyceHerrman in
[jdx#8032](jdx#8032)

### Security

- **(deps)** update time crate to 0.3.47 to fix RUSTSEC-2026-0009 by
@jdx in [jdx#8026](jdx#8026)

### New Contributors

- @sheeki03 made their first contribution in
[jdx#8024](jdx#8024)
- @TylerHillery made their first contribution in
[jdx#8019](jdx#8019)

## 📦 Aqua Registry Updates

#### New Packages (1)

-
[`kubernetes-sigs/kubectl-validate`](https://github.com/kubernetes-sigs/kubectl-validate)

#### Updated Packages (6)

-
[`flux-iac/tofu-controller/tfctl`](https://github.com/flux-iac/tofu-controller/tfctl)
- [`gogs/gogs`](https://github.com/gogs/gogs)
- [`j178/prek`](https://github.com/j178/prek)
- [`syncthing/syncthing`](https://github.com/syncthing/syncthing)
- [`tuist/tuist`](https://github.com/tuist/tuist)
- [`yaml/yamlscript`](https://github.com/yaml/yamlscript)
@my1e5 my1e5 deleted the gem-newline-revert branch March 3, 2026 10:39
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