actions / runner-images

GitHub Actions runner images
MIT License
9.17k stars 2.84k forks source link

Issue with `pwsh` no longer being available on `latest` build images. #9752

Closed brittandeyoung closed 2 weeks ago

brittandeyoung commented 3 weeks ago

Description

Starting today our teams started recieving this error with no changes to the pipeline code.

windows-latest Error:

##[error]The term 'pwsh.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

ubuntu-latest error:

##[error]Unable to locate executable file: 'pwsh'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

Platforms affected

Runner images affected

Image version and build link

ubuntu

Starting: Initialize job
Agent name: 'Azure Pipelines 3'
Agent machine name: 'fv-az162-756'
Current agent version: '3.238.0'
Operating System
Ubuntu
22.04.4
LTS
Runner Image
Image: ubuntu-22.04
Version: 20240422.1.0
Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20240422.1/images/ubuntu/Ubuntu2204-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20240422.1
Runner Image Provisioner
2.0.369.1
Current image version: '20240422.1.0'
Agent running as: 'vsts'
Prepare build directory.
Set build variables.
Download all required tasks.
Downloading task: PowerShell (2.237.5)

windows

Starting: Initialize job
Agent name: 'Azure Pipelines 4'
Agent machine name: 'fv-az687-781'
Current agent version: '3.238.0'
Operating System
Microsoft Windows Server 2022
10.0.20348
Datacenter
Runner Image
Image: windows-2022
Version: 20240421.1.0
Included Software: https://github.com/actions/runner-images/blob/win22/20240421.1/images/windows/Windows2022-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/win22%2F20240421.1
Runner Image Provisioner
2.0.369.1
Current image version: '20240421.1.0'
Agent running as: 'VssAdministrator'
Prepare build directory.
Set build variables.
Download all required tasks.
Downloading task: PowerShell (2.237.5)

### Is it regression?

n/a

### Expected behavior

using the powershell task with `pwsh: true` on the managed images should work. 

### Actual behavior

we receive the provided error when attempting to use a powershell task

### Repro steps

add a powershell task using pwsh to a pipeline and attempt to run it using `windows-latest` or `ubuntu-latest`:
  - task: PowerShell@2
    inputs:
      targetType: 'inline'
      pwsh: true
      ```
sergei-pyshnoi commented 2 weeks ago

Hello @brittandeyoung . We will take a look.

brittandeyoung commented 2 weeks ago

@sergei-pyshnoi As of today, the issue has stopped. So maybe something was already done to resolve the issue?

sssharif commented 2 weeks ago

thank you for your report, we can't reproduce problem on our side else we don't see reports for same issue from other customers. we are closing this issue for now; please let us know if it reappears.

cheng93 commented 1 week ago

Im seeing this on ubuntu

Image: ubuntu-22.04
Version: 20240422.1.0

false positive.

Setting a variable called path does bad things