Skip to content

Commit a0351bd

Browse files
committed
feat(cli): add --env to rivet shell command (#2434)
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->
1 parent c6c6948 commit a0351bd

File tree

1 file changed

+5
-1
lines changed
  • packages/toolchain/cli/src/commands

1 file changed

+5
-1
lines changed

packages/toolchain/cli/src/commands/shell.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ use crate::util::task::{run_task, TaskOutputStyle};
1111
#[derive(Parser, Serialize)]
1212
#[serde(rename_all = "camelCase")]
1313
pub struct Opts {
14+
/// Specify the environment to use (will prompt if not specified)
15+
#[clap(long, alias = "env")]
16+
environment: Option<String>,
17+
1418
#[clap(
1519
long,
1620
short = 'e',
@@ -56,7 +60,7 @@ impl Opts {
5660

5761
// Always populate environment variables
5862
let ctx = crate::util::login::load_or_login().await?;
59-
let env_slug = crate::util::env::get_or_select(&ctx, Option::<String>::None).await?;
63+
let env_slug = crate::util::env::get_or_select(&ctx, self.environment.as_ref()).await?;
6064
let bootstrap_data = run_task::<get_bootstrap_data::Task>(
6165
TaskOutputStyle::None,
6266
get_bootstrap_data::Input {},

0 commit comments

Comments
 (0)