From e8571c04ef233948ec1a0f52a4b820b93b5b6e5e Mon Sep 17 00:00:00 2001 From: Kevin Rowlandson Date: Tue, 30 Jun 2020 16:12:40 +0100 Subject: [PATCH] Remove CurrentUser scope for PSScriptAnalyzer --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 073881de..cebdf2a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,7 +39,7 @@ 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 and set scope to CurrentUser +# Specify PSScriptAnalyzer Repository and Version for stability ARG PSSA_VERSION='1.19.0' RUN mkdir -p /opt/microsoft/powershell/7 \ && curl -s https://api.github.com/repos/powershell/powershell/releases/latest \ @@ -49,8 +49,7 @@ RUN mkdir -p /opt/microsoft/powershell/7 \ | xargs -n 1 wget -O - \ | tar -xzC /opt/microsoft/powershell/7 \ && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh \ - && pwsh -c 'Install-Module -Name PSScriptAnalyzer -Repository PSGallery -RequiredVersion ${PSSA_VERSION} -Scope CurrentUser -Force' \ - && pwsh -c 'Import-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Force' + && pwsh -c 'Install-Module -Name PSScriptAnalyzer -Repository PSGallery -RequiredVersion ${PSSA_VERSION} -Force' ##################### # Run Pip3 Installs #