Skip to content

feat(install): Add output for the setting and removal of environment variables#6460

Merged
niheaven merged 5 commits intoScoopInstaller:developfrom
abgox:add-env-var-output
Nov 10, 2025
Merged

feat(install): Add output for the setting and removal of environment variables#6460
niheaven merged 5 commits intoScoopInstaller:developfrom
abgox:add-env-var-output

Conversation

@abgox
Copy link
Copy Markdown

@abgox abgox commented Aug 19, 2025

Description

Add output for the setting and removal of environment variables.

Motivation and Context

Closes #6459

Checklist:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

Summary by CodeRabbit

  • New Features

    • Installation now shows colored console messages when environment variables are set or removed, providing clearer feedback during setup.
  • Documentation

    • Changelog updated with the new installation entry and improved formatting for feature and bug-fix entries for clearer reading.

@abgox abgox changed the title Add output for the setting and removal of environment variables feat: Add output for the setting and removal of environment variables Aug 19, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 9, 2025

Walkthrough

Adds user-facing logging to the PowerShell installer for when environment variables are set or removed, and updates CHANGELOG.md formatting and a new feature entry documenting that output.

Changes

Cohort / File(s) Summary
Changelog
CHANGELOG.md
Rewrote several entries for formatting (bolded headings/bullets) and added a new feature entry: "install: Add output for the setting and removal of environment variables".
PowerShell install script
lib/install.ps1
Inserted informational output lines in env_set and env_rm functions to print colored messages before calling Set-EnvVar / Remove-Item (no functional change to env persistence).

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant InstallScript as lib/install.ps1
  participant EnvOp as env_set / env_rm
  participant System as System Env

  Note over InstallScript,EnvOp: New informational output added

  User->>InstallScript: run installer
  InstallScript->>EnvOp: call env_set / env_rm
  EnvOp->>InstallScript: emit colored informational message
  EnvOp->>System: perform Set-EnvVar / Remove-Item
  System-->>EnvOp: success/failure
  EnvOp-->>InstallScript: return status
  InstallScript-->>User: exit code / final message
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Mostly small, consistent additions of logging in two functions and textual edits to a single changelog file.
  • Review focus:
    • lib/install.ps1 — confirm logging formatting, localization, and no side effects before env operations.
    • CHANGELOG.md — verify entry accuracy and formatting consistency.

Poem

🐰
I hopped through scripts with nimble paws,
I sang when vars were set because—
A gentle message now will chime,
When paths are added, or removed in time,
Hooray, the shell speaks back in rhyme! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding output for setting and removal of environment variables, which directly matches the changeset.
Linked Issues check ✅ Passed The PR implements the feature requirement from issue #6459 by adding logging outputs in env_set and env_rm functions to display colored messages when environment variables are modified.
Out of Scope Changes check ✅ Passed All changes are directly related to the objective: CHANGELOG entry documents the feature, and lib/install.ps1 adds the required output logging for environment variable operations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 416ba31 and 7bd24b3.

📒 Files selected for processing (2)
  • CHANGELOG.md (2 hunks)
  • lib/install.ps1 (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • CHANGELOG.md
  • lib/install.ps1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@niheaven niheaven changed the title feat: Add output for the setting and removal of environment variables feat(install): Add output for the setting and removal of environment variables Nov 10, 2025
@niheaven niheaven merged commit 7e86336 into ScoopInstaller:develop Nov 10, 2025
3 checks passed
@abgox abgox deleted the add-env-var-output branch November 10, 2025 10:56
abgox added a commit to abgox/abyss that referenced this pull request Nov 10, 2025
abgox added a commit to abgox/abyss that referenced this pull request Nov 11, 2025
Deide pushed a commit to Deide/scoop that referenced this pull request Feb 14, 2026
…variables (ScoopInstaller#6460)

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
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