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

0.46.1 & 0.46.2 package installation fails #3815

Closed
2 tasks done
miketimofeev opened this issue Jan 24, 2022 · 9 comments · Fixed by #3817, actions/runner-images#4967 or #3890
Closed
2 tasks done

0.46.1 & 0.46.2 package installation fails #3815

miketimofeev opened this issue Jan 24, 2022 · 9 comments · Fixed by #3817, actions/runner-images#4967 or #3890
Labels
bug Unexpected and reproducible misbehavior.

Comments

@miketimofeev
Copy link

New Issue Checklist

Describe the bug

Swiftlint 0.46.1 package installation fails with the following error (0.46.0 installation works just fine):

sudo installer -pkg ./SwiftLint.pkg -target /
installer: Package name is SwiftLint
installer: Installing at base path /
installer: The install failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. The package is attempting to install content to the system volume.)
Complete output when running SwiftLint, including the stack trace and command used

n\a

Environment

  • SwiftLint version 0.46.1

  • Installation method used pre-built package

  • Paste your configuration file: n\a

  • Are you using nested configurations?
    If so, paste their relative paths and respective contents.

  • Which Xcode version are you using (check xcodebuild -version)?

  • Do you have a sample that shows the issue? Run echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules
    to quickly test if your example is really demonstrating the issue. If your example is more
    complex, you can use swiftlint lint --path [file here] --no-cache --enable-all-rules.

// This triggers a violation:
let foo = try! bar()
@jpsim
Copy link
Collaborator

jpsim commented Jan 24, 2022

That's odd, since both 0.46.0 and 0.46.1 were produced minutes apart using the same script. Looking into this.

@jpsim
Copy link
Collaborator

jpsim commented Jan 24, 2022

For what it's worth, I get the same error with 0.46.0 and 0.46.1.

@jpsim
Copy link
Collaborator

jpsim commented Jan 24, 2022

I get a different error when installing using the GUI:

This package is incompatible with this version of macOS.

Screen Shot 2022-01-24 at 12 32 47

@jpsim
Copy link
Collaborator

jpsim commented Jan 24, 2022

According to Stack Overflow, it's no longer valid in macOS 11 or later to specify a package installation location of /. In #3817 I'm changing the location to /usr/local/bin and it works for me on macOS 11.6.2 with the GUI and the following command: sudo installer -pkg ./SwiftLint.pkg -target /.

Does this work for you @miketimofeev?

I don't know if /usr/local/bin will always be a good path to install the binary though (should it be different on M1s?).

@jpsim
Copy link
Collaborator

jpsim commented Jan 24, 2022

Do you need me to cut a release with this fix?

@miketimofeev
Copy link
Author

miketimofeev commented Jan 24, 2022

Do you need me to cut a release with this fix?

@jpsim thanks for the replies first of all!
/usr/local/bin should be fine, please cut a release when you have a chance as we install swiftlint as a part of GitHub hosted images generation in https://github.com/actions/virtual-environments and our macOS builds are failing due to this issue.

@jpsim
Copy link
Collaborator

jpsim commented Jan 27, 2022

https://github.com/realm/SwiftLint/releases/tag/0.46.2 should have the fixed package installer

@miketimofeev
Copy link
Author

@jpsim I'm afraid that was done in the wrong way, the binary is now installed not under /usr/local/bin but under /usr/local/bin/usr/local/bin/:

Mac-2403:~ runner$ cd /usr/local/bin/usr/local/bin/
Mac-2403:bin runner$ ls -la
total 56496
drwxr-xr-x  3 root  wheel        96 Jan 27 06:20 .
drwxr-xr-x  3 root  wheel        96 Jan 27 06:20 ..
-rwxr-xr-x  1 root  wheel  28922406 Jan 27 06:20 swiftlint

@jpsim
Copy link
Collaborator

jpsim commented Jan 28, 2022

Well that's no good. It installed it under /usr/local/bin/swiftlint when I tested it. 🤔

I still find it odd that the package suddenly broke in 0.46.1 if it was working in 0.46.0. I hadn't touched that pkg creation code in literally years.

@jpsim jpsim reopened this Jan 28, 2022
@jpsim jpsim changed the title 0.46.1 package installation fails 0.46.1 & 0.46.2 package installation fails Jan 28, 2022
@jpsim jpsim added the bug Unexpected and reproducible misbehavior. label Jan 28, 2022
@jpsim jpsim reopened this Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
2 participants