ERROR: environment already active

When I try to activate an environment that is already active I get an error:

± flox activate -e rust                                                                                                                                                                                                                                                                                                                             
ERROR: /Users/etorreborre/.local/share/flox/environments/etorreborre/rust environment already active

Since the operation is idempotent and not breaking anything maybe a nicer informative message would be enough:

/Users/etorreborre/.local/share/flox/environments/etorreborre/rust environment already active

The reason its an error is that you could have non idempotent shellHooks associated with your shell or packages therein.
I note that the presentation could be lowered in severity

1 Like

Just to note that there is a ticket internally to look at this error warning and modify accordingly. We’ll try to get it included in an upcoming release. Thanks for the suggestion! :slight_smile:

[late edit - this was done :+1:]

1 Like