Skip to content

Conversation

@HaraldNordgren
Copy link
Contributor

@HaraldNordgren HaraldNordgren commented Aug 7, 2024

When showing cask dependency info, also show the installation status.

This mirrors how it already works for formulas.

@request-info
Copy link

request-info bot commented Aug 7, 2024

Please provide a better issue/pull request title and/or description!

@request-info request-info bot added the needs response Needs a response from the issue/PR author label Aug 7, 2024
@HaraldNordgren HaraldNordgren force-pushed the cask_deps branch 13 times, most recently from 1a92ff5 to f6318c6 Compare August 7, 2024 19:19
@HaraldNordgren HaraldNordgren deleted the cask_deps branch August 7, 2024 19:46
@HaraldNordgren HaraldNordgren restored the cask_deps branch August 8, 2024 07:59
@HaraldNordgren HaraldNordgren reopened this Aug 8, 2024
@HaraldNordgren
Copy link
Contributor Author

The issue that I run into so far is that when cask dependencies are just strings, so it fails when trying to check if they are satisfies in ::Utils::Info.decorate_dependencies.

For the formula the dependencies a a fully-fledged type.

@MikeMcQuaid
Copy link
Member

@HaraldNordgren I'm game to help more if you want to keep this open?

@HaraldNordgren
Copy link
Contributor Author

Thanks @MikeMcQuaid!

After the vacation period, I am now back on my full-time job again. Combined with having kids, this doesn't leave a ton of time to work on open source, unfortunately.

I will re-open this if I get some inspiration! 🤗

@MikeMcQuaid
Copy link
Member

@HaraldNordgren Thanks for the heads up!

@HaraldNordgren HaraldNordgren changed the title Show dependencies for casks Show dependency status for casks (✔/✘) Dec 20, 2025
@HaraldNordgren HaraldNordgren marked this pull request as ready for review December 20, 2025 00:25
@HaraldNordgren
Copy link
Contributor Author

HaraldNordgren commented Dec 20, 2025

Hi @MikeMcQuaid!

One year later and I'm on winter vacation so I have some time again 🎄

I think I got it to work now, do you want to take a look? 🤗

def pretty_uninstalled(string)
if !$stdout.tty?
string
"#{string} ✘"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without these changes, I couldn't find a way to assert my changes.

Unfortunately, this requires changes to a lot of other tests. Is there a better way?

Copy link
Member

Choose a reason for hiding this comment

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

Ensure that stdout.tty is mocked to false. Cannot accept these changes as-is.

Copy link
Contributor Author

@HaraldNordgren HaraldNordgren Dec 20, 2025

Choose a reason for hiding this comment

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

@MikeMcQuaid Is there a canonical way to achieve that? I tried a few things before and couldn't get that to work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MikeMcQuaid I found a way now, there will be a lot of control characters in the test output, is it worth it?

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.

Changes look good so far, bar comment.

def pretty_uninstalled(string)
if !$stdout.tty?
string
"#{string} ✘"
Copy link
Member

Choose a reason for hiding this comment

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

Ensure that stdout.tty is mocked to false. Cannot accept these changes as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs response Needs a response from the issue/PR author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants