Skip to content

Mac OS runner with bash -el {0} overwrites existing PATH #10624

@hoxbro

Description

@hoxbro

Description

Mac OS runner with bash -el {0} overwrites existing PATH

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

20240911.3

https://github.com/hoxbro/example-repo/actions/runs/10879060685/job/30183040885

Is it regression?

yes, 20240903.5

Expected behavior

It should only append to PATH

Actual behavior

Using bash -el {0} overwrites existing PATH. This started happening with 20240911.3, because of this line:

PATH="/opt/homebrew/bin:/opt/homebrew/sbin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin"; export PATH;

Repro steps

I have an MRE repo here: https://github.com/hoxbro/example-repo/actions/runs/10879060685. This used to work on macOS and currently works on Windows and Linux.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions