Skip to content
This repository was archived by the owner on Oct 5, 2022. It is now read-only.

swift xcode link-templates fails if homebrew is installed in custom location #16

Open
andrekandore opened this issue Feb 24, 2019 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@andrekandore
Copy link

andrekandore commented Feb 24, 2019

Summary

Running swift xcode link-templates when homebrew is installed somewhere other than /usr/local will cause the link to fail.

In my case, my homebrew is installed in ~/.homebrew so the swift-xcode-link-templates doesn't find it.

Expectation

swift-xcode-link-templates would work even if homebrew was installed in custom location (using $BREW_HOME for example)

Actual Result

swift-xcode-link-templates uses hardcoded /usr/local for the prefix.


Workaround

Define

export prefix="$BREW_HOME"

in .bash_profile, and swift xcode link-templates will find the homebrew dir.


Potential Solution

  1. Mention in README or Wiki about custom homebrew location explaning to define the workaround mentioned above.

  2. Change the script to use or at least check $BREW_HOME is defined or not and use as prefix.

  3. Define a different env variable for the link templates script specifically and mention in the README... something like SWIFT_XCODE_TEMPLATES_HOME


Sorry for the long report, but hope this is some use! ^^

@helje5
Copy link
Member

helje5 commented Feb 24, 2019

Fair enough! Thanks for reporting.

@helje5 helje5 added enhancement New feature or request good first issue Good for newcomers labels Feb 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Development

No branches or pull requests

2 participants