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

Do not check if macOS uses an Intel CPU #3

Closed
wants to merge 1 commit into from
Closed

Do not check if macOS uses an Intel CPU #3

wants to merge 1 commit into from

Conversation

MWin123
Copy link

@MWin123 MWin123 commented Oct 31, 2022

This fixes kcctl/kcctl#134.

See also kcctl/kcctl#245. Although SDKMAN! requires an additional fix.

@C0urante
Copy link
Contributor

Thanks for the fix @MWin123! I'm wondering if we can also make the error message a bit clearer for the general case where a user has tried to install kcctl onto an unsupported environment?

Thinking something like this:

  if OS.linux? && Hardware::CPU.intel?
    url "https://github.com/kcctl/kcctl/releases/download/v1.0.0.Alpha5/kcctl-1.0.0.Alpha5-l>
    sha256 "669006978af4599da25221fbeaabf6cd956061238a3a1ab452435f0b574d16a8"
  elsif OS.mac?     
    url "https://github.com/kcctl/kcctl/releases/download/v1.0.0.Alpha5/kcctl-1.0.0.Alpha5-o>
    sha256 "562e59dd6890567492eb4f43a2dc64c45caf78d7f7794039a1a179c0e7af9fbb"
  else
    raise RuntimeError.new("kcctl is only supported on Linux (with Intel CPU) or MacOS")
  end

@MWin123
Copy link
Author

MWin123 commented Dec 6, 2022

Thanks @C0urante, the custom error message is definitely a good addition.

Feel free to submit your own PR to replace this one. I just changed one line anyway.

@gunnarmorling
Copy link
Contributor

Closing, as it has been superseded by @C0urante's PR. Thanks a lot nevertheless, @MWin123!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants