Conversation
Pull Request Test Coverage Report for Build 20787465907Details
💛 - Coveralls |
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe changes refactor profile name persistence in the login command by replacing a hard-coded constant path with dynamic resolution based the user's HOME directory. The exported 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@internal/utils/profile.go`:
- Around line 146-152: SaveProfileName currently writes prof verbatim which lets
relative custom profile paths break when reloaded; update SaveProfileName so
that if the value is a non-built-in profile (i.e., will be treated as a file
path by LoadProfile) you canonicalize it before persisting by calling
filepath.Clean and converting to an absolute path (use filepath.Abs) when prof
is not already absolute, then write that canonical path with WriteFile; keep
behavior for built-in names unchanged and preserve error handling from
getProfilePath.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: f0613fac-7e97-4c56-892b-986e156b87c7
📒 Files selected for processing (3)
cmd/login.gointernal/utils/misc.gointernal/utils/profile.go
💤 Files with no reviewable changes (1)
- internal/utils/misc.go
What kind of change does this PR introduce?
Bug fix
What is the new behavior?
Since profile is loaded before changing workdir, we can't rely on project specific temp directory.
Instead, we use the user home directory for caching the current profile.
Additional context
Add any other context or screenshots.