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

Description
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
-
Mention in README or Wiki about custom homebrew location explaning to define the workaround mentioned above.
-
Change the script to use or at least check $BREW_HOME is defined or not and use as prefix.
-
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! ^^