Relocate storage and cover source-mode environment variable - #42
Merged
Gabriel Dufresne (GabrielDuf) merged 6 commits intoSep 1, 2026
Merged
Conversation
Copilot started reviewing on behalf of
Gabriel Dufresne (GabrielDuf)
September 1, 2026 15:19
View session
Copilot started reviewing on behalf of
Gabriel Dufresne (GabrielDuf)
September 1, 2026 15:36
View session
Copilot started reviewing on behalf of
Gabriel Dufresne (GabrielDuf)
September 1, 2026 17:05
View session
Marc-André Moreau (mamoreau-devolutions)
approved these changes
Sep 1, 2026
Gabriel Dufresne (GabrielDuf)
deleted the
feat/pinget-source-mode-env
branch
September 1, 2026 17:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new mechanism for controlling the storage location and source mode in Pinget via environment variables, and updates the version to 0.11.0 across all components. It adds robust logic for parsing and resolving the source mode from environment variables, updates the documentation, and expands test coverage to ensure correct behavior. These changes improve flexibility for embedding, sandboxing, and customizing Pinget's behavior in different environments.
Environment Variable Support and Source Mode Logic:
PINGET_APPROOT(controls storage root) andPINGET_SOURCE_MODE(controls source mode:auto,private, orsystem-winget-mirror) in both the Rust CLI and C# core. The logic ensures that explicit options override environment variables, and sensible defaults are chosen when variables are unset. (README.md,rust/crates/pinget-core/src/lib.rs,dotnet/src/Devolutions.Pinget.Core/Repository.cs)rust/crates/pinget-core/src/lib.rs,dotnet/src/Devolutions.Pinget.Core/Repository.cs)Documentation and User Guidance:
README.mdexplaining the new environment variable behavior, including fallback logic and embedding scenarios.Test Coverage Improvements:
dotnet/src/Devolutions.Pinget.Core.Tests/CoreTests.cs)Version Bump and Consistency:
dotnet/src/Devolutions.Pinget.Cli/Program.cs,dotnet/src/Devolutions.Pinget.PowerShell.Cmdlets/ModuleFiles/Devolutions.Pinget.Client.psd1,dotnet/src/Devolutions.Pinget.PowerShell.Engine/PowerShellEngineVersion.cs,nuget/Devolutions.Pinget.Cli.DotNet/Devolutions.Pinget.Cli.DotNet.csproj,nuget/Devolutions.Pinget.Cli.Rust/Devolutions.Pinget.Cli.Rust.csproj,rust/crates/pinget-cli/Cargo.toml,rust/crates/pinget-com/Cargo.toml,rust/crates/pinget-core/Cargo.toml)Test Infrastructure:
[CollectionDefinition]attributes to test classes to ensure proper test isolation for repository state. (dotnet/src/Devolutions.Pinget.Core.Tests/CoreTests.cs)