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

Specify that KV stores and links can be created in non-interactive mode #176

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/commands/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ pub struct DeployCommand {
/// non-interactive environments such as release pipelines; therefore,
/// if any links are specified, all links must be specified.
///
/// Links must be of the form 'sqlite:label=database'. Databases that
/// do not exist will be created.
/// Links must be of the form 'sqlite:label=database' or
/// 'kv:label=store'. Databases or key value stores that do not exist
/// will be created.
#[clap(long = "link")]
pub links: Vec<String>,
}
Expand Down Expand Up @@ -1011,7 +1012,7 @@ impl FromStr for LinkageSpec {
};

let Some((label, resource)) = pair.split_once('=') else {
bail!("Links must be of the form '<resource-identifier>:label=resource'");
bail!("Links must be of the form 'sqlite:label=database' or 'kv:label=store'");
};

let label = label.trim();
Expand All @@ -1028,7 +1029,7 @@ impl FromStr for LinkageSpec {
resource_name: resource.to_owned(),
resource_type: ResourceType::KeyValueStore,
}),
_ => bail!("Links must be of the form '<resource-identifier>:label=resource"),
_ => bail!("Links must be of the form 'sqlite:label=database' or 'kv:label=store'"),
}
}
}
Expand Down
Loading