Azure / Azure/azure-quickstart-templates

After installing PowerShell Core on WSL, I have pwsh but not powershell: Test-AzureRMTemplate.sh

Open
#6,599 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Bicep
Stars
14.9k
Forks
16.2k
Avg merge
6d 21h
Merged PRs (30d)
6

Description

This one seems so simple I must have it wrong. I use WSL for all my ARM development on Windows 10. So, to run the tests I now must install powershell. I was unable to do so using apt due to this issue:

```
sudo apt-get install -y powershell
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
powershell : Depends: libicu55 but it is not installable
E: Unable to correct problems, you have held broken packages.
```

So I tried the [binary archive approach](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-6#installation---binary-archives). This worked, but I ended up with `/usr/bin/pwsh` but no equivalent `powershell`. Now, sure, I could do a symlink to make it so `powershell` works, but that seems wrong. So I'll issue a PR changing `Test-AzureRMTemplate.sh`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with Test-AzureRMTemplate.sh and inspect how it invokes PowerShell. Run the template tests in WSL using the installed PowerShell Core command, and confirm the script executes successfully without requiring an unavailable powershell binary.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.