Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git and choco on Windows #10953

Closed
1 of 15 tasks
liquidcarbon opened this issue Nov 12, 2024 · 6 comments
Closed
1 of 15 tasks

Git and choco on Windows #10953

liquidcarbon opened this issue Nov 12, 2024 · 6 comments

Comments

@liquidcarbon
Copy link

Description

Per windows-latest readme, git and choco are available on Win runners.

But these workflows are failing:

What am I doing wrong? What might be missing from documentation?

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
  • macOS 15
  • macOS 15 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Runner Image
  Image: windows-2022
  Version: 20241021.1.0
  Included Software: https://github.com/actions/runner-images/blob/win22/20241021.1/images/windows/Windows2022-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/win22%2F2024[10](https://github.com/liquidcarbon/puppy/actions/runs/11801850154/job/32876134788#step:1:11)21.1

Is it regression?

unknown

Expected behavior

should work?

Actual behavior

not working

Repro steps

choco install git on windows runner

@vidyasagarnimmagaddi
Copy link
Contributor

Hi @liquidcarbon ,Thank you for bringing this issue to our attention. We are looking into this issue and will update you on this issue after investigating

@hemanthmanga
Copy link
Contributor

Hi @liquidcarbon, Your patience is appreciated. Kindly update your workflow file, Please look into this https://github.com/hemanthmanga/puppy/actions/runs/12159242869/job/33908947994, Hope it will resolve your issue.Thanks

@liquidcarbon
Copy link
Author

Thank you for looking into this.
So it's just a matter of adding all the needed tools to PATH at the outset?
PATH: "C:\\Users\\runneradmin\\.pixi\\bin;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\Git\\bin"

@hemanthmanga
Copy link
Contributor

In some instances, you may need to include the path. We are closing this issue. Thank you.

@shamil-mubarakshin
Copy link
Contributor

Hey @liquidcarbon,
Runners come with predefined PATH variable, which includes directories for most tools.
It looks like you are manipulating machine level $env:PATH variable in your workflow. Unless it is your intention to completely overwrite PATH, appending might be preferable. You could you use something like below to make directories available in subsequent actions:

- name: append env
  run: |
    "c:\temp" | Out-File -FilePath "$env:GITHUB_PATH" -Append

You could also check if the following would do the job:

- name: append env
  run: |
    $currentPath = [System.Environment]::GetEnvironmentVariable("PATH", "Machine")
    $newPath ="c:\temp" + ';' + $currentPath
    [Environment]::SetEnvironmentVariable("PATH", $newPath, "Machine")

@liquidcarbon
Copy link
Author

@shamil-mubarakshin sounds like the right thing to do would've been appending to PATH, but instead I initially overwrote it: PATH: C:\Users\runneradmin\.pixi\bin . Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants