chocolatey / Chocolatey.Cake.Recipe

A set of convention based Cake scripts for building Chocolatey projects
Apache License 2.0
5 stars 9 forks source link

Installation of PowerShell modules may fail if not run elevated #130

Closed corbob closed 2 months ago

corbob commented 6 months ago

Checklist

What You Are Seeing?

With the release of Chocolatey.Cake.Recipe 0.26.0, the ability to use PSScriptAnalyzer was added. The way that this is done is by installing the PowerShell modules needed if they can't be found. Unfortunately the default Windows PowerShell configuration has an older PSGet module, and it defaults to installing to the AllUsers Scope. This means that it can't install modules if you're not running as administrator.

What is Expected?

Should install modules to the CurrentUser scope if the AllUsers scope is unavailable.

How Did You Get This To Happen?

Running the build script for licensing-services, got the error:

image

System Details

Installed Packages

N/A

Output Log

See above screenshot.

Additional Context

Some other things we might want to account for (These may be good to split to other issues, mostly just dumping thoughts here for now):

choco-bot commented 2 months ago

:tada: This issue has been resolved in version 0.26.4 :tada:

The release is available on:

Your GitReleaseManager bot :package: :rocket: