1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Homebrew swiftlint command not found in Xcode

Posted at

Homebrew経由でインストールしたswiftlintがXcodeから見えない問題

現象

ターミナルからはswiftlintが実行できるのに、XcodeのRun Scriptからは swiftlint: command not found になっちゃう。

解決方法

スクリプト内でApple Silicon向けのbrew directoryをPATH指定する

# Adds support for Apple Silicon brew directory
export PATH="$PATH:/opt/homebrew/bin"

if which swiftlint; then
    swiftlint autocorrect && swiftlint
else
  echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi

環境

Xcode 13.2.1

参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?