-
-
Notifications
You must be signed in to change notification settings - Fork 402
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(env): Allow exporting env vars as dotenv format #3185
Conversation
src/cli/env.rs
Outdated
@@ -34,8 +38,10 @@ impl Env { | |||
|
|||
if self.json { | |||
self.output_json(&config, ts) | |||
} else { | |||
} else if self.shell.is_some() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this still default to $SHELL
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not, will fix that!
@@ -55,6 +61,15 @@ impl Env { | |||
} | |||
Ok(()) | |||
} | |||
|
|||
fn output_dotenv(&self, config: &Config, ts: Toolset) -> Result<()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs an e2e test
As the title says, this allows exporting currently active environment variables(excluding
PATH
) in a dotenv format.