Skip to content

Support adding custom env vars when using ProcessRunner to run a process#221

Merged
DecSmith42 merged 2 commits into
mainfrom
feat/process-runner-env-vars
Sep 29, 2025
Merged

Support adding custom env vars when using ProcessRunner to run a process#221
DecSmith42 merged 2 commits into
mainfrom
feat/process-runner-env-vars

Conversation

@DecSmith42

Copy link
Copy Markdown
Collaborator

No description provided.

Enhanced `ProcessRunner` to support adding custom environment variables via `ProcessRunOptions`. Updated logging to include environment variables when applicable (secrets will still be masked).
Copilot AI review requested due to automatic review settings September 29, 2025 01:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for custom environment variables when using ProcessRunner to execute processes. The implementation allows users to specify environment variables through the ProcessRunOptions class, which are then applied to the process during execution.

  • Added EnvironmentVariables property to ProcessRunOptions as a Dictionary<string, string?>
  • Updated logging logic in both Run and RunAsync methods to handle different combinations of WorkingDirectory and EnvironmentVariables
  • Implemented environment variable setting in process StartInfo for both synchronous and asynchronous execution paths

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

File Description
DecSm.Atom/Process/ProcessRunOptions.cs Added EnvironmentVariables property with comprehensive documentation
DecSm.Atom/Process/ProcessRunner.cs Enhanced logging and added environment variable configuration for process execution
Multiple .csproj files Updated package dependencies to newer versions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread DecSm.Atom/Process/ProcessRunner.cs
Comment thread DecSm.Atom/Process/ProcessRunner.cs
Comment thread DecSm.Atom/Process/ProcessRunner.cs
@DecSmith42 DecSmith42 merged commit 26804fd into main Sep 29, 2025
36 of 39 checks passed
@DecSmith42 DecSmith42 deleted the feat/process-runner-env-vars branch September 29, 2025 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants