Skip to content

Windows: bundle config set --local path with an \r (e.g. D:\a\resolv\) turns \r into a carriage return #884

@olleolleolle

Description

@olleolleolle

Ensure the following before filing this issue

  • I verified it reproduces with the latest version with - uses: ruby/setup-ruby@v1 (see Versioning policy)

  • I tried to reproduce the issue locally by following the workflow steps (including all commands done by ruby/setup-ruby, except for Downloading Ruby & Extracting Ruby),
    and it did not reproduce locally (if it does reproduce locally, it's not a ruby/setup-ruby issue)

Are you running on a GitHub-hosted runner or a self-hosted runner?

GitHub-hosted runner

Link to the failed workflow job (must be a public workflow job, so the necessary information is available)

https://github.com/ruby/resolv/actions/runs/22871558841/job/66417445617?pr=121

Any other notes?

(I didn't do the reproduce steps re: Windows, since I don't have a Windows, but I think the output clarifies what is going on:

> bundle install
Setting BUNDLER_VERSION=4 for "bundle config|lock" commands below to ensure Bundler 4 is used
C:\Windows\system32\cmd.exe /D /S /C "D:\rubyinstaller-head-x64\bin\bundle.bat config set --local path D:\a\resolv\resolv\vendor\bundle"
C:\Windows\system32\cmd.exe /D /S /C "D:\rubyinstaller-head-x64\bin\bundle.bat lock"
Writing lockfile to D:/a/resolv/resolv/Gemfile.lock
Fetching https://github.com/ruby/ruby-core-tasks.git
There was an error creating `D:/a/
esolv/
esolv/vendor/bundle/ruby/4.1.0+1/cache/bundler/git`.
The underlying system error is Errno::EINVAL: Invalid argument @ dir_s_mkdir -
D:/a/
esolv
Error: The process 'D:\rubyinstaller-head-x64\bin\bundle.bat' failed with exit code 32

Note where there are newlines.

The bundle.bat config set --local path D:\a\resolv\resolv\vendor\bundle has not quoted or escaped its value.

EDIT: See ruby/rubygems#9377 for a fix upstream.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions