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: show lima version #3748

Closed
wants to merge 1 commit into from
Closed

Conversation

afbjorklund
Copy link
Contributor

What does this PR do?

Finds the location of the limactl binary, and show the version of Lima.

Screenshot/screencast of this PR

podman-desktop-lima-version

What issues does this PR fix or reference?

How to test this PR?

brew install lima
limactl start template://podman

@afbjorklund afbjorklund requested review from benoitf and a team as code owners September 3, 2023 16:03
@afbjorklund afbjorklund requested review from dgolovin and cdrage and removed request for a team September 3, 2023 16:03
extensions/lima/src/util.ts Outdated Show resolved Hide resolved
extensions/lima/src/util.ts Outdated Show resolved Hide resolved
extensions/lima/src/limactl.ts Outdated Show resolved Hide resolved
let provider;
if (fs.existsSync(socketPath) || fs.existsSync(configPath)) {
provider = extensionApi.provider.createProvider({
name: 'Lima',
id: 'lima',
status: 'unknown',
version,
Copy link
Collaborator

Choose a reason for hiding this comment

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

it might be better to update the version when you've the result and not hold the activate method

activate method should be a 'fast call', (as we wait the ending of the activate method on all extensions before showing the UI)

so probably, in activate you register the provider, then asynchronously you grab the version and call provider.updateVersion

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a local binary, but sure. (i.e. it takes 50 ms to run, unlike podman version which takes 5 seconds)

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
@afbjorklund
Copy link
Contributor Author

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.

None yet

2 participants