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

feat: allow font install on linux #18874

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

SMillerDev
Copy link
Member

@SMillerDev SMillerDev commented Dec 4, 2024

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

This should disable quarantine on Linux, allow installing fonts and set a location for the fonts. Marking this as draft until I've had a moment to test it.

Waiting for #18808 to be merged

@SMillerDev SMillerDev force-pushed the feat/cask/font_install branch 3 times, most recently from 801829e to e5c2c8c Compare December 5, 2024 08:11
@SMillerDev SMillerDev changed the title feat: only block cask install on Linux feat: allow font install on linux Dec 9, 2024
@SMillerDev SMillerDev force-pushed the feat/cask/font_install branch from e5c2c8c to d1b5f68 Compare December 14, 2024 14:30
@SMillerDev
Copy link
Member Author

Installing fonts now works, although it is still installing in the macOS location. I can't get the DEFAULTS to work.

@SMillerDev SMillerDev force-pushed the feat/cask/font_install branch 3 times, most recently from 99e0454 to ed30ba7 Compare December 14, 2024 15:14
@SMillerDev SMillerDev force-pushed the feat/cask/font_install branch from ed30ba7 to 378ff7c Compare December 21, 2024 16:45
@SMillerDev SMillerDev force-pushed the feat/cask/font_install branch 3 times, most recently from 6e8fc52 to 75ac2b5 Compare January 7, 2025 20:36
# frozen_string_literal: true

require "extend/os/mac/cask/artifact/moved" if OS.mac?
require "extend/os/linux/cask/artifact/moved" if OS.linux?
Copy link
Member

@dduugg dduugg Jan 9, 2025

Choose a reason for hiding this comment

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

Not something to take on in this PR, but I wonder if we should have a single require file for all of an OS's extensions, rather than introduce three more require files here. 🤔

Copy link
Member

Choose a reason for hiding this comment

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

I think this approach is maybe a bit nicer for now.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good. I also realized that the requires need to come after the generic versions, due to sorbet limitations, so that would be a tricky dance to pull off anyway.

@SMillerDev
Copy link
Member Author

Thanks for the pointers @dduugg !

@SMillerDev SMillerDev force-pushed the feat/cask/font_install branch from f78ac90 to 43f989e Compare January 14, 2025 18:55
@SMillerDev SMillerDev force-pushed the feat/cask/font_install branch from a438928 to 76c1313 Compare January 14, 2025 20:15
Co-authored-by: Douglas Eichelberger <[email protected]>
@SMillerDev
Copy link
Member Author

It seems to work now, thanks so much for the help @dduugg !

It's happening

@SMillerDev SMillerDev marked this pull request as ready for review January 14, 2025 20:18
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Makes sense! Happy to merge this when you are.

@@ -208,6 +210,16 @@ def languages=(languages)
end
end

sig { returns(T.any(String, Pathname)) }
def fontdir
get_dir_path(:fontdir)
Copy link
Member

Choose a reason for hiding this comment

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

would be good if this or any of the other lines missing test coverage could have some added

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, this was actually part of my attempt to fix the DEFAULTS because the whole definition of methods based on hash keys made my head spin.

If we want to keep the hash thing, I think that would work now as well. So I can remove these methods again if you prefer.

Copy link
Member

Choose a reason for hiding this comment

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

Don't mind either way.

# frozen_string_literal: true

require "extend/os/mac/cask/artifact/moved" if OS.mac?
require "extend/os/linux/cask/artifact/moved" if OS.linux?
Copy link
Member

Choose a reason for hiding this comment

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

I think this approach is maybe a bit nicer for now.

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.

3 participants