Skip to content

fix(setup-osuosl-ca): use pwsh on Windows to avoid Cygwin CRLF issue - #135

Open
bastelfreak wants to merge 1 commit into
mainfrom
fix-windows-osuosl-ca-crlf
Open

fix(setup-osuosl-ca): use pwsh on Windows to avoid Cygwin CRLF issue#135
bastelfreak wants to merge 1 commit into
mainfrom
fix-windows-osuosl-ca-crlf

Conversation

@bastelfreak

Copy link
Copy Markdown
Contributor

The composite action used 'shell: bash' for all platforms. On windows runners with Cygwin, GitHub Actions generates the temp script with Windows CRLF line endings. Cygwin bash without '-o igncr' treats the \r as a command name, resulting in exit code 127.

We switch to PowerShell on windows to use native tools instead of Cygwin.
Fixes: https://github.com/OpenVoxProject/puppet-runtime/actions/runs/33179641401/job/98877289758

Error for future reference:

  # Replace any backslashes with forward slashes so that a Windows path
  # is usable from both POSIX and WIN32 contexts.
  osuosl_ca="${RUNNER_TEMP//\\//}/osuosl-ca.pem"

  printf 'Downloading Mozilla CA bundle to: %s\n' "${osuosl_ca}"

  curl -sSL https://curl.se/ca/cacert.pem -o "${osuosl_ca}"

  printf 'AWS_CA_BUNDLE=%s' "${osuosl_ca}" >>$GITHUB_ENV
  shell: C:\cygwin64\bin\bash.EXE --noprofile --norc -e -o pipefail {0}
  env:
    VANAGON_LOCATION: https://github.com/openvoxproject/vanagon#main
D:\a\_temp\dcb0f279-a648-4603-9fd7-75c1faa0e719.sh: line 4: $'\r': command not found
Error: Process completed with exit code 127.

Short description

Checklist

I have:

The composite action used 'shell: bash' for all platforms. On windows
runners with Cygwin, GitHub Actions generates the temp script with
Windows CRLF line endings. Cygwin bash without '-o igncr'
treats the \r as a command name, resulting in exit code 127.

We switch to PowerShell on windows to use native tools instead of
Cygwin.
Fixes: https://github.com/OpenVoxProject/puppet-runtime/actions/runs/33179641401/job/98877289758

Error for future reference:
```
  # Replace any backslashes with forward slashes so that a Windows path
  # is usable from both POSIX and WIN32 contexts.
  osuosl_ca="${RUNNER_TEMP//\\//}/osuosl-ca.pem"

  printf 'Downloading Mozilla CA bundle to: %s\n' "${osuosl_ca}"

  curl -sSL https://curl.se/ca/cacert.pem -o "${osuosl_ca}"

  printf 'AWS_CA_BUNDLE=%s' "${osuosl_ca}" >>$GITHUB_ENV
  shell: C:\cygwin64\bin\bash.EXE --noprofile --norc -e -o pipefail {0}
  env:
    VANAGON_LOCATION: https://github.com/openvoxproject/vanagon#main
D:\a\_temp\dcb0f279-a648-4603-9fd7-75c1faa0e719.sh: line 4: $'\r': command not found
Error: Process completed with exit code 127.
```

Signed-off-by: Tim Meusel <tim@bastelfreak.de>
@bastelfreak
bastelfreak requested a review from Sharpie August 28, 2026 17:06
@bastelfreak bastelfreak self-assigned this Aug 28, 2026
@bastelfreak bastelfreak added the bug Something isn't working label Aug 28, 2026
@bastelfreak

Copy link
Copy Markdown
Contributor Author

The commit description is my guess. I had no time yet to test it.

@bastelfreak

Copy link
Copy Markdown
Contributor Author

@bastelfreak

Copy link
Copy Markdown
Contributor Author

@bastelfreak
bastelfreak enabled auto-merge August 28, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant