runner-images icon indicating copy to clipboard operation
runner-images copied to clipboard

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

Open brittandeyoung opened this issue 10 months ago • 0 comments

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

  • [X] Azure DevOps
  • [ ] GitHub Actions - Standard Runners
  • [ ] GitHub Actions - Larger Runners

Runner images affected

  • [ ] Ubuntu 20.04
  • [X] Ubuntu 22.04
  • [ ] macOS 11
  • [ ] macOS 12
  • [ ] macOS 13
  • [ ] macOS 13 Arm64
  • [ ] macOS 14
  • [ ] macOS 14 Arm64
  • [ ] Windows Server 2019
  • [X] Windows Server 2022

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
      ```

brittandeyoung avatar Apr 26 '24 15:04 brittandeyoung