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: add flox envs command #1264

Merged
merged 5 commits into from
Apr 23, 2024
Merged

feat: add flox envs command #1264

merged 5 commits into from
Apr 23, 2024

Conversation

ysndr
Copy link
Contributor

@ysndr ysndr commented Apr 2, 2024

This PR adds an environment registry and flox envs command.

Flox commands has so far been mostly stateless, i.e. the fact that an environment exists at a given path is "forgotten" as soon as the command completes.
flox envs is supposed to list both active and available/inactive environments (that are represented by .flox directories).
To avoid scanning for .flox directories, we use the env registry introduced in #1312.

In addition, the flox envs supports filtering the output to only active environments as well as formatting its output as JSON.

@ysndr ysndr self-assigned this Apr 2, 2024
@ysndr ysndr mentioned this pull request Apr 2, 2024
mkenigs

This comment was marked as outdated.

@ysndr

This comment was marked as outdated.

@mkenigs

This comment was marked as outdated.

@zmitchell

This comment was marked as outdated.

@zmitchell

This comment was marked as outdated.

@ysndr

This comment was marked as outdated.

@ysndr ysndr force-pushed the feat/command/envs branch 2 times, most recently from d680066 to c9087aa Compare April 17, 2024 16:30
Copy link
Contributor

@zmitchell zmitchell left a comment

Choose a reason for hiding this comment

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

Aside from the other comments I've left, it would be nice to write a couple of tests for get_registered_environments, etc.

cli/flox/doc/flox-envs.md Outdated Show resolved Hide resolved
cli/flox/doc/flox-envs.md Outdated Show resolved Hide resolved
cli/flox/doc/flox-envs.md Outdated Show resolved Hide resolved
cli/flox/doc/flox-envs.md Outdated Show resolved Hide resolved
cli/flox/doc/flox-envs.md Outdated Show resolved Hide resolved
cli/flox/src/commands/envs.rs Outdated Show resolved Hide resolved
cli/flox/src/commands/envs.rs Show resolved Hide resolved
@zmitchell zmitchell added this pull request to the merge queue Apr 23, 2024
Merged via the queue into main with commit 251c239 Apr 23, 2024
14 checks passed
@zmitchell zmitchell deleted the feat/command/envs branch April 23, 2024 16:46
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

3 participants