Skip to content
This repository was archived by the owner on Oct 5, 2022. It is now read-only.
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

Description

@andrekandore

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! ^^

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions