Skip to content

[Mac][app_config] Dotfiles initialization cannot complete on first run on a new system #3

@rucker

Description

@rucker

The dotfiles install routine depends on GNU realpath, of which there is no equivalent on MacOS. The core brewfile includes coreutils which satisfies the dependency -- however, because when run from the setup script, app_config will proceed to clone the dotfiles repo and run its install in a subshell. Result: Although realpath will be installed, it will not be on $PATH and dotfiles setup will always fail.

Possible solutions:

  • Check that realpath exists and alias that command to its known full path /opt/homebrew/bin/realpath as a prerequisite in app_config.
  • If Homebrew was installed for the first time via this repo's brew script, invoke eval "$(/opt/homebrew/bin/brew shellenv)" which is instructed as part of the success message output by Homebrew at install time. It appears that once that has been done, /opt/homebrew/bin might be prepended to $PATH (although I'm not sure how as nothing is written to e.g. .zprofile by this command alone) and realpath will be found.
  • Badger the dotfiles devs into removing the realpath dependency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions