How can I brew link a specific version?

前端 未结 5 534
故里飘歌
故里飘歌 2020-12-07 09:37

I have a few kegs of the same package in /usr/local/Cellar/libfoo like /usr/local/Cellar/libfoo/1.0.1, /usr/local/Cellar/libfoo/HEAD a

5条回答
  •  爱一瞬间的悲伤
    2020-12-07 09:57

    if @simon's answer is not working in some of the mac's please follow the below process.

    If you have already installed swiftgen using the following commands:

    $ brew update $ brew install swiftgen

    then follow the steps below in order to run swiftgen with older version.

    Step 1: brew uninstall swiftgen Step 2: Navigate to: https://github.com/SwiftGen/SwiftGen/releases and download the swiftgen with version: swiftgen-4.2.0.zip.

    Unzip the package in any of the directories.

    Step 3: Execute the following in a terminal:

    $ mkdir -p ~/dependencies/swiftgen
    $ cp -R ~//swiftgen-4.2.0/ ~/dependencies/swiftgen
    $ cd /usr/local/bin
    $ ln -s ~/dependencies/swiftgen/bin/swiftgen swiftgen
    $ mkdir ~/Library/Application\ Support/SwiftGen
    $ ln -s ~/dependencies/swiftgen/templates/ ~/Library/Application\ Support/SwiftGen/
    
    $ swiftgen --version
    

    You should get: SwiftGen v0.0 (Stencil v0.8.0, StencilSwiftKit v1.0.0, SwiftGenKit v1.0.1)

提交回复
热议问题