fix: include GUI apps (casks) when installing from remote config#18
fix: include GUI apps (casks) when installing from remote config#18jerryjrxie wants to merge 6 commits intoopenbootdotdev:mainfrom
Conversation
|
👋 Thanks for opening this pull request! 🎉 This is your first PR to OpenBoot — welcome! Before merging:
@fullstackjam will review this soon. Thanks for contributing! 🚀 |
There was a problem hiding this comment.
Pull request overview
Fixes remote-config installs so GUI apps (Homebrew casks) are included in the selected package set and therefore installed, addressing the regression where casks were silently skipped.
Changes:
- Include remote-config casks in
SelectedPkgsduringrunCustomInstall. - Include remote-config casks in
SelectedPkgsduringstepPackageCustomization.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
internal/installer/installer.go |
Ensures remote-config casks are added to SelectedPkgs so Step 4 installs GUI apps. |
internal/installer/step_packages.go |
Ensures remote-config casks are included in the selected set during package customization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| for _, cask := range st.RemoteConfig.Casks { | ||
| st.SelectedPkgs[cask.Name] = true | ||
| } |
There was a problem hiding this comment.
This change alters the remote-config install behavior by adding casks to SelectedPkgs, but the existing unit test TestRunInstall_DryRunRemoteConfig only asserts formulae selection. Please extend it to assert that the remote-config cask(s) (e.g., firefox) are also present in st.SelectedPkgs to prevent regressions.
The previous implementation only checked --global git config, but users may have their git identity configured in: - Local repository config (.git/config) - System config (/etc/gitconfig) - Other scopes This change first tries --global, then falls back to checking all scopes if --global returns empty. This ensures we detect git configuration regardless of where it's set. Closes git config detection issue
Adds TestGetGitConfig_FallsBackToAnyScope to verify that GetGitConfig checks all git config scopes (global, local, system) when looking for user.name and user.email, not just --global. Related to git config detection issue
The diffDotfiles function was always checking the local ~/.dotfiles git state, even when comparing snapshots with empty dotfiles URLs. This caused test failures when the user's actual dotfiles repo had uncommitted changes. Fix: Only check dotfiles repo state if at least one URL is configured. If both system and reference have empty dotfiles URLs, skip the git state check entirely. This makes the tests deterministic and not dependent on the user's local dotfiles repo state.
When installing from a remote config (e.g., 'openboot install jx'), GUI apps (casks) were being silently skipped. The code only added CLI packages to the SelectedPkgs map but never added the Casks. This fix adds the missing loop to include casks in both: - internal/installer/installer.go (runCustomInstall) - internal/installer/step_packages.go (stepPackageCustomization) Closes openbootdotdev#17
Adds TestRunCustomInstall_IncludesCasksInSelectedPkgs to verify that GUI apps (casks) from remote configs are properly added to SelectedPkgs. This prevents regression of the bug where casks were silently skipped during remote config installation. Related to openbootdotdev#17
70f3c5d to
0f5c077
Compare
1429852 to
82a7e90
Compare
Summary
Fixes #17 - GUI apps (Homebrew casks) were being silently skipped when installing from remote configs (e.g.,
openboot install jx).Problem
When installing from a remote config, only CLI packages were added to
SelectedPkgs, but Casks (GUI apps) were never added. This caused all GUI apps to be skipped during installation.Solution
Added the missing loop to include casks in:
internal/installer/installer.go(inrunCustomInstallfunction)internal/installer/step_packages.go(instepPackageCustomizationfunction)Testing
./openboot install jx --dry-runnow shows "Installing 68 packages (43 CLI, 25 GUI)" instead of "Installing 43 packages (43 CLI, 0 GUI)"go vet- passesChecklist
go vetpasses)