Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find swiftlint when it is in an alternate location #1757

Merged
merged 1 commit into from
Jun 23, 2024

Conversation

barijaona
Copy link
Member

SwiftLint was not found by Xcode when it is installed through Homebrew
on a Mac Silicon machine.

Copy link
Contributor

@Eitot Eitot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also just add SwiftLint to /usr/local/bin (which is what I did):
sudo ln -s /opt/homebrew/opt/swiftlint/bin/swiftlint /usr/local/bin/swiftlint

@@ -1993,7 +1993,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\n swiftlint --lenient\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
shellScript = "export PATH=/opt/homebrew/bin:/sw/bin:/opt/local/bin:/usr/local/bin:${PATH}\n\nif which swiftlint >/dev/null; then\n swiftlint --lenient\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
shellScript = "export PATH=/opt/homebrew/bin:/sw/bin:/opt/local/bin:/usr/local/bin:${PATH}\n\nif which swiftlint >/dev/null; then\n swiftlint --lenient\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
shellScript = "PATH=${PATH}:/opt/homebrew/bin:/opt/local/bin:/sw/bin\n\nif which swiftlint >/dev/null; then\n swiftlint --lenient\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably safer to keep the system paths at the start, in case the user installed something else that collides with a system component. /usr/local/bin is already in the default PATH.

@josh64x2 josh64x2 merged commit 08cd7fd into ViennaRSS:master Jun 23, 2024
1 check passed
@barijaona barijaona deleted the swiftlint branch June 24, 2024 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants