Skip to content

Add compatibility for log-commands when using other DEV VM managers like Lima #525

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

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

Conversation

E-VANCE
Copy link
Contributor

@E-VANCE E-VANCE commented Mar 12, 2025

This PR should add compatibility for running log-commands like trellis logs --error development when using other DEV VM managers then Vagrant like Lima.

See #511.

Also includes an added test case for ensuring the tailCmd method correctly generates command strings based on different flag combinations.

Couldn't get around to test this one yet as I am unsure how to use brew to install the forked trellis-cli...?

Disclaimer: I am not a go-to-guy and had a little help from AI and there may be a few too many comments included 💡

E-VANCE added 2 commits March 12, 2025 14:05
Use `findDevInventory` to auto-detect development VM provider and run commands accordingly.
New `TestLogsTailCommand`-function that ensures the `tailCmd` method correctly generates command strings based on different flag combinations.
@swalkinshaw
Copy link
Member

Thanks for the proposed improvement.

Couldn't get around to test this one yet as I am unsure how to use brew to install the forked trellis-cli...?

When you run go build locally, I just export the PATH like this:

export PATH=$PATH:/your/path/to/trellis-cli

Then run trellis-cli from anywhere to run the local binary

My main feedback for this PR is that I'd like to have the logic unified. Right now there's two completely separate paths. For example the goaccess check is duplicated in two places. Ideally we could figure out the tail command separately.

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.

2 participants