-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
base: master
Are you sure you want to change the base?
Conversation
801829e
to
e5c2c8c
Compare
e5c2c8c
to
d1b5f68
Compare
Installing fonts now works, although it is still installing in the macOS location. I can't get the DEFAULTS to work. |
99e0454
to
ed30ba7
Compare
ed30ba7
to
378ff7c
Compare
6e8fc52
to
75ac2b5
Compare
# frozen_string_literal: true | ||
|
||
require "extend/os/mac/cask/artifact/moved" if OS.mac? | ||
require "extend/os/linux/cask/artifact/moved" if OS.linux? |
There was a problem hiding this comment.
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. 🤔
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Thanks for the pointers @dduugg ! |
Co-authored-by: Douglas Eichelberger <[email protected]>
f78ac90
to
43f989e
Compare
a438928
to
76c1313
Compare
Co-authored-by: Douglas Eichelberger <[email protected]>
It seems to work now, thanks so much for the help @dduugg ! |
There was a problem hiding this 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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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? |
There was a problem hiding this comment.
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.
brew style
with your changes locally?brew typecheck
with your changes locally?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