Skip to content

fix: include GUI apps (casks) when installing from remote config#18

Open
jerryjrxie wants to merge 6 commits intoopenbootdotdev:mainfrom
jerryjrxie:fix/gui-apps-install
Open

fix: include GUI apps (casks) when installing from remote config#18
jerryjrxie wants to merge 6 commits intoopenbootdotdev:mainfrom
jerryjrxie:fix/gui-apps-install

Conversation

@jerryjrxie
Copy link
Copy Markdown

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 (in runCustomInstall function)
  • internal/installer/step_packages.go (in stepPackageCustomization function)

Testing

  • Built and tested locally: ./openboot install jx --dry-run now shows "Installing 68 packages (43 CLI, 25 GUI)" instead of "Installing 43 packages (43 CLI, 0 GUI)"
  • Ran go vet - passes
  • Actually installed several GUI apps (Notion, Shottr, TablePlus) successfully

Checklist

  • Code follows project style (go vet passes)
  • Conventional commit format used
  • One change per commit
  • Tested locally

@github-actions
Copy link
Copy Markdown

👋 Thanks for opening this pull request!

🎉 This is your first PR to OpenBoot — welcome!

Before merging:

  • Code follows existing patterns in the codebase
  • go build ./... and go vet ./... pass
  • Commit message is clear and descriptive

@fullstackjam will review this soon. Thanks for contributing! 🚀

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 SelectedPkgs during runCustomInstall.
  • Include remote-config casks in SelectedPkgs during stepPackageCustomization.

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.

Comment on lines +145 to +147
for _, cask := range st.RemoteConfig.Casks {
st.SelectedPkgs[cask.Name] = true
}
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Jerry Xie and others added 5 commits March 28, 2026 22:31
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
@jerryjrxie jerryjrxie force-pushed the fix/gui-apps-install branch from 70f3c5d to 0f5c077 Compare March 29, 2026 05:57
@jerryjrxie jerryjrxie force-pushed the fix/gui-apps-install branch from 1429852 to 82a7e90 Compare March 29, 2026 07:02
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.

No GUI or NPM install are working

2 participants