mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-22 00:31:07 -05:00
Remove version (7) from PowerShell directory path
This commit is contained in:
parent
4d3117057f
commit
6792c8bbfa
1 changed files with 5 additions and 4 deletions
|
@ -39,17 +39,18 @@ RUN apk add --no-cache \
|
|||
#########################################
|
||||
# Reference: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7
|
||||
# Slightly modified to always retrieve latest stable Powershell version
|
||||
# Specify PSScriptAnalyzer Repository and Version for stability
|
||||
# If changing PWSH_VERSION='latest' to a specific version, use format PWSH_VERSION='tags/v7.0.2'
|
||||
ARG PWSH_VERSION='latest'
|
||||
ARG PWSH_DIRECTORY='/opt/microsoft/powershell'
|
||||
ARG PSSA_VERSION='latest'
|
||||
RUN mkdir -p /opt/microsoft/powershell/7 \
|
||||
RUN mkdir -p ${PWSH_DIRECTORY} \
|
||||
&& curl -s https://api.github.com/repos/powershell/powershell/releases/${PWSH_VERSION} \
|
||||
| grep browser_download_url \
|
||||
| grep linux-alpine-x64 \
|
||||
| cut -d '"' -f 4 \
|
||||
| xargs -n 1 wget -O - \
|
||||
| tar -xzC /opt/microsoft/powershell/7 \
|
||||
&& ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh \
|
||||
| tar -xzC ${PWSH_DIRECTORY} \
|
||||
&& ln -s ${PWSH_DIRECTORY}/pwsh /usr/bin/pwsh -f \
|
||||
&& pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force'
|
||||
|
||||
#####################
|
||||
|
|
Loading…
Reference in a new issue