I want to downgrade the swiftlint version on my MBP M1 Pro.
I installed it using brew install swiftlint
In homebrew/Cellar/swiftlint
the folder is 0.49.1
which I guess is the version installed on my machine.
I googled and tried a few methods. But non of them worked for me.
First: brew install <url of older github raw file>
is not working
Second: brew install swiftlint@0.47.0
was also not working
Third:
0.47.0
form github, extracted and created a new folder homebrew/Cellar/swiftlint/0.47.0
and pasted the content there. After double clicking on the executable file swiftlint starts running.brew switch swiftlint 0.47.0
but it was also not workinghomebrew/bin/swiftlint
and pasted new alias from homebrew/Cellar/swiftlint/0.47.0
folder's executable there, but it was also not working. Can anyone help me out what I am doing wrong, and what should be the correct steps.
I am new to macOS.
I have found a work around. Earlier I wasn't aware how files, applictions works in MacOS, where does the data for applications go.
I am writing down the steps for swiftlint
, maybe similar steps might be used to downgrade any other tool on MacOS (on M1 pro macbook).
What worked for me was:
xcode-select --print-path
was different so I changed it with sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
.swiftlint
using brew uninstall command..pkg
file of exact version I wanted, and installed it.portable zip
from same repository and extracted the contents and pasted them in homebrew/Cellar/swiftlint/
homebrew/bin
Then this exact version of swiftlint
was installed for me, and now it works fine.
Hope this helps someone.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.