mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-23 01:34:19 +08:00
Fix mariner sudo detection (#19304)
* Change the permissions on the symlink created for mariner * Update installpsh-mariner.sh * Update install-ps.yml * Update linux.yml * Update installpsh-mariner.sh
This commit is contained in:
parent
fb7bb75ebc
commit
7afe8437d7
@ -9,13 +9,8 @@ trigger:
|
||||
- feature*
|
||||
paths:
|
||||
include:
|
||||
- /tools/install-powershell.sh
|
||||
- /tools/installpsh-amazonlinux.sh
|
||||
- /tools/installpsh-debian.sh
|
||||
- /tools/installpsh-osx.sh
|
||||
- /tools/installpsh-redhat.sh
|
||||
- /tools/installpsh-suse.sh
|
||||
- /tools/install-powershell.ps1
|
||||
- /tools/install-powershell.*
|
||||
- /tools/installpsh-*.sh
|
||||
- /.vsts-ci/install-ps.yml
|
||||
pr:
|
||||
branches:
|
||||
@ -26,11 +21,7 @@ pr:
|
||||
paths:
|
||||
include:
|
||||
- /tools/install-powershell.sh
|
||||
- /tools/installpsh-amazonlinux.sh
|
||||
- /tools/installpsh-debian.sh
|
||||
- /tools/installpsh-osx.sh
|
||||
- /tools/installpsh-redhat.sh
|
||||
- /tools/installpsh-suse.sh
|
||||
- /tools/installpsh-*.sh
|
||||
- /tools/install-powershell.ps1
|
||||
- /.vsts-ci/install-ps.yml
|
||||
|
||||
|
@ -44,6 +44,7 @@ pr:
|
||||
- test/common/markdown/*
|
||||
- test/perf/*
|
||||
- tools/releaseBuild/*
|
||||
- tools/install*
|
||||
- tools/releaseBuild/azureDevOps/templates/*
|
||||
- README.md
|
||||
- .spelling
|
||||
|
@ -27,7 +27,7 @@ gitreposubpath="PowerShell/PowerShell/master"
|
||||
gitreposcriptroot="https://raw.githubusercontent.com/$gitreposubpath/tools"
|
||||
thisinstallerdistro=mariner
|
||||
repobased=false
|
||||
gitscriptname="installpsh-mariner.psh"
|
||||
gitscriptname="installpsh-mariner.sh"
|
||||
pwshlink=/usr/bin/pwsh
|
||||
|
||||
echo
|
||||
@ -109,11 +109,11 @@ fi
|
||||
SUDO=''
|
||||
if (( EUID != 0 )); then
|
||||
#Check that sudo is available
|
||||
if [[ ("'$*'" =~ skip-sudo-check) && ("$(whereis sudo)" == *'/'* && "$(sudo -nv 2>&1)" != 'Sorry, user'*) ]]; then
|
||||
if [[ ("'$*'" =~ skip-sudo-check) || ("$(whereis sudo)" == *'/'* && "$(sudo -nv 2>&1)" != 'Sorry, user'*) ]]; then
|
||||
SUDO='sudo'
|
||||
else
|
||||
echo "ERROR: You must either be root or be able to use sudo" >&2
|
||||
#exit 5
|
||||
exit 5
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -139,8 +139,8 @@ $SUDO tdnf install -y \
|
||||
openssh-clients \
|
||||
ca-certificates \
|
||||
tar \
|
||||
curl \
|
||||
&& tdnf clean all
|
||||
curl
|
||||
$SUDO tdnf clean all
|
||||
|
||||
##END Check requirements and prerequisites
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user