diff options
author | Roopesh Chander <roop@roopc.net> | 2021-08-02 13:41:52 +0530 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-09-22 06:58:14 +0200 |
commit | 3668f3af9f56ab340fe7ea88b55f60383c5242cc (patch) | |
tree | 75e7dc0e5bb20e20bcde17ff7f8befc490186eb6 | |
parent | UI: Use 'On-Demand', with hyphen, consistently (diff) | |
download | wireguard-apple-3668f3af9f56ab340fe7ea88b55f60383c5242cc.tar.xz wireguard-apple-3668f3af9f56ab340fe7ea88b55f60383c5242cc.zip |
build: Include 'swiftlint' location in the PATH before invoking it
In macOS 11, HomeBrew installs swiftlint under /opt/homebrew, which is not
in the default path that Xcode seems to use. So we include the PATH
to contain:
- /usr/local/bin:
Where HomeBrew installs 'swiftlint' in macOS 10.15 and earlier
- /opt/homebrew/bin:
Where HomeBrew installs 'swiftlint' in macOS 11
Signed-off-by: Roopesh Chander <roop@roopc.net>
-rw-r--r-- | WireGuard.xcodeproj/project.pbxproj | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/WireGuard.xcodeproj/project.pbxproj b/WireGuard.xcodeproj/project.pbxproj index c7f2958..8b19d16 100644 --- a/WireGuard.xcodeproj/project.pbxproj +++ b/WireGuard.xcodeproj/project.pbxproj @@ -1158,7 +1158,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; + shellScript = "export PATH=${PATH}:/usr/local/bin:/opt/homebrew/bin\nif which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; }; 5F45417B21C0906F00994C13 /* Swiftlint */ = { isa = PBXShellScriptBuildPhase; @@ -1176,7 +1176,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; + shellScript = "export PATH=${PATH}:/usr/local/bin:/opt/homebrew/bin\nif which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; }; 5F784E5721CDF6DD00B8D9A0 /* Strip Trailing Whitespace */ = { isa = PBXShellScriptBuildPhase; @@ -1212,7 +1212,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; + shellScript = "export PATH=${PATH}:/usr/local/bin:/opt/homebrew/bin\nif which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; }; 6FB1BDB821D4FA9100A991BF /* Strip Trailing Whitespace */ = { isa = PBXShellScriptBuildPhase; @@ -1248,7 +1248,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; + shellScript = "export PATH=${PATH}:/usr/local/bin:/opt/homebrew/bin\nif which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; }; /* End PBXShellScriptBuildPhase section */ |