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

Powershell installation throws error on SLES15 OS. #16959

Closed
5 tasks done
yogeshbirla opened this issue Mar 4, 2022 · 9 comments
Closed
5 tasks done

Powershell installation throws error on SLES15 OS. #16959

yogeshbirla opened this issue Mar 4, 2022 · 9 comments
Labels
Needs-Triage The issue is new and needs to be triaged by a work group.

Comments

@yogeshbirla
Copy link
Contributor

Prerequisites

Steps to reproduce

Get the latest SLES15SP5 image. Try to install powershell using installpsh-suse.sh or install-powershell.sh script. It throws error saying OS is not supported.

Script supports SLES15 but there is bad code in there which prevents the execution. Below code for checking OS has been deprecated after SLES12 so it works for SLES12 but not for SLES15. We need to check for /etc/os-release to get the correct OS version.

elif [ -f /etc/SuSE-release ] ; then

Expected behavior

installpsh-suse.sh or install-powershell.sh should install powershell on sles15.

Actual behavior

installpsh-suse.sh or install-powershell.sh throws error on sles15 because of deprecated code being used.

Error details

No response

Environment data

localhost:~ # bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) suse
Get-PowerShell MASTER Installer Version 1.2.0
Installs PowerShell and Optional The Development Environment
  Original script is at: https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools\install-powershell.psh
Arguments used: suse

Operating System Details:
  OS: linux
  DIST:
  DistroBasedOn:
  PSUEDONAME:
  REV:
  KERNEL: 5.3.18-57-default
  MACH: x86_64
  OSSTR:
Sorry, your operating system is based on  and is not supported by PowerShell or this installer at this time.

Visuals

No response

@yogeshbirla yogeshbirla added the Needs-Triage The issue is new and needs to be triaged by a work group. label Mar 4, 2022
@iSazonov
Copy link
Collaborator

iSazonov commented Mar 5, 2022

Please use our template for requesting new OS support.

@iSazonov iSazonov added the Resolution-Answered The question is answered. label Mar 5, 2022
@yogeshbirla
Copy link
Contributor Author

This script currently supports anything above Sles12. I removed the bad code that I mentioned above "elif [ -f /etc/SuSE-release ] ; then" and I was able to install powershell for sles15. This is not new OS support. It is just some old code related to Sles12 needs to be removed.

@iSazonov iSazonov added Area-Maintainers-Build specific to affecting the build and removed Resolution-Answered The question is answered. labels Mar 5, 2022
@kasini3000
Copy link

kasini3000 commented Mar 6, 2022

hi @yogeshbirla
would you like to submit the script code pr?
or
Submit tested improved script code to here

@yogeshbirla
Copy link
Contributor Author

@kasini3000 I would like to submit PR for this change. Can you please let me know the process.

@kasini3000
Copy link

kasini3000 commented Mar 6, 2022

@yogeshbirla
Copy link
Contributor Author

I have the code ready. It is not allowing me to send Pull request. My git account is with email birlayogesh@gmail.com.

I am getting:
remote: Permission to PowerShell/PowerShell.git denied to yogeshbirla.

@vexx32
Copy link
Collaborator

vexx32 commented Mar 10, 2022

Yeah, you can't push directly to this repository. What you want to do is create a new fork in your own Github account by clicking the Fork button at the top right of this repository. Then copy the Clone URL from there and add it as a remote to your local copy of the git repository (git remote add personal https://replace.with.clone/url.git). Then push the changes in your local branch to your fork (git push personal -u branch-name-here).

Once that's done you can go to the Pull Requests page and GitHub normally will detect you've pushed a new branch to your fork and prompt you to open a pull request for that branch.

@yogeshbirla
Copy link
Contributor Author

PR submitted. #16984

@adityapatwardhan
Copy link
Member

The above PR #16984 has potentially fixed the issue. Please re-open it is still not working. Install script is not officially supported by the PowerShell team and is a community driven effort.

@ghost ghost removed the Needs-Triage The issue is new and needs to be triaged by a work group. label Jun 7, 2022
@adityapatwardhan adityapatwardhan added Needs-Triage The issue is new and needs to be triaged by a work group. and removed Area-Maintainers-Build specific to affecting the build labels Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Triage The issue is new and needs to be triaged by a work group.
Projects
None yet
Development

No branches or pull requests

5 participants