pack - run in portable mode
- Dominant language
- C#
- Stars
- 11.5k
- Forks
- 960
- PR merge metrics
- No merged PRs in 30d
Description
### What You Are Seeing?
When using `choco pack`, attempts are made to access `C:\ProgramData` which results in warnings and errors. I do not have Chocolatey installed on the machine this error occured on, but installed the `chocolatey` package (version 0.10.8) from nuget as part of a Cake script.
This also affects CI builds.
### What is Expected?
For choco.exe not to do attempt anything that requires Chocolatey to be installed when packing or elevated rights. If this behavior can't be changed, an opt-out flag to choco.exe would be appreciated (when running it in "portable" mode).
### How Did You Get This To Happen? (Steps to Reproduce)
I ran the following command:
`D:/Source/Git/spectre/jarvis/tools/chocolatey.0.10.8/chocolatey/tools/chocolateyInstall/choco.exe"
pack -y --version "0.3.0-alpha0074" "D:/Source/Git/spectre/jarvis/installer/chocolatey/jarvis.temp.nuspec`
### Output Log
```
This is try 1/3. Retrying after 400 milliseconds.
Error converted to warning:
Access to the path 'C:\ProgramData\chocolatey\config\chocolatey.config.20700.update' is denied.
This is try 2/3. Retrying after 600 milliseconds.
Error converted to warning:
Access to the path 'C:\ProgramData\chocolatey\config\chocolatey.config.20700.update' is denied.
Maximum tries of 3 reached. Throwing error.
Chocolatey v0.10.8
Attempting to build package from 'jarvis.temp.nuspec'.
Successfully created package 'D:\Source\Git\spectre\jarvis\.artifacts\jarvis.0.3.0-alpha0074.nupkg'
```
I would be happy to help out with a PR for this issue if you think it's worth pursuing (and if I get some pointers).
Contributor guide
Assessment
This issue has not been assessed yet.