Skip to content

Commit

Permalink
fix(cli/secrets): Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
xdoardo committed Jul 16, 2024
1 parent 8465143 commit 3817315
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions lib/cli/src/commands/app/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,6 @@ pub struct AppIdentOpts {
pub app: Option<AppIdent>,
}

/// A utility struct used by commands that need the [`AppIdent`] as a flag.
#[derive(clap::Parser, Debug)]
pub struct AppIdentFlag {
/// Identifier of the application.
///
/// Valid input:
/// - namespace/app-name
/// - app-alias
/// - App ID
#[clap(long)]
pub app: Option<AppIdent>,
}

// Allowing because this is not performance-critical at all.
#[allow(clippy::large_enum_variant)]
pub enum ResolvedAppIdent {
Expand Down Expand Up @@ -210,6 +197,22 @@ mod tests {
}
}

/// A utility struct used by commands that need the [`AppIdent`] as a flag.
///
/// NOTE: Differently from [`AppIdentOpts`], the use of this struct does not entail searching the
/// current directory for an `app.yaml` if not specified.
#[derive(clap::Parser, Debug)]
pub struct AppIdentFlag {
/// Identifier of the application.
///
/// Valid input:
/// - namespace/app-name
/// - app-alias
/// - App ID
#[clap(long)]
pub app: Option<AppIdent>,
}

pub(super) async fn login_user(
api: &ApiOpts,
env: &WasmerEnv,
Expand Down

0 comments on commit 3817315

Please sign in to comment.