fix: allow running as administrator and patch path/version bugs - #3911
fix: allow running as administrator and patch path/version bugs#3911ahkurdev wants to merge 1 commit into
Conversation
- Allow spicetify to run/install under administrator/root without exiting. Previously it hard-failed with os.Exit(1); now it only warns and continues, since Spotify runs as a normal user. --bypass-admin still silences the warning. - Fix Linux Spotify path detection: flatpak/launcher candidate paths containing '$HOME' were returned as raw literals without env expansion, so detection failed. Now returns the env-resolved path (src/utils/config.go). - Guard splitVersion against empty version string to avoid index-out-of-range panic (src/preprocess/preprocess.go). - Remove unreachable 'return err' after log.Fatal in Unzip (src/utils/utils.go). Co-Authored-By: ahkurdev <ah.kurniawan27@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe changes make elevated execution non-fatal, validate empty version strings, expand fallback Linux installation paths, and terminate on unzip directory-creation failures. ChangesRuntime behavior updates
Estimated code review effort: 3 (Moderate) | ~15–30 minutes Merge Risk: ⚪ Minimal · up to The PR makes localized fixes for administrator execution, Linux path expansion, empty-version handling, and unreachable error handling; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
We don't want users to run spicetify as administrator. It's our choice and it's going to stay this way. Other stuff are not even applicable - when you use AI, at least know what you're changing |
Summary
os.Exit(1); now it only warns and continues (Spotify normally runs as a normal user).--bypass-adminstill silences the warning.$HOMEwere returned as raw literals without env expansion, so detection failed. Now returns the env-resolved path (src/utils/config.go).splitVersionagainst an empty version string to avoid an index-out-of-range panic (src/preprocess/preprocess.go).return errafterlog.FatalinUnzip(src/utils/utils.go).Test plan
go build ./...andgo vet ./...pass.Co-Authored-By: ahkurdev ah.kurniawan27@gmail.com
Summary by CodeRabbit