Skip to content

Commit

Permalink
Merge pull request #176 from kate-goldenring/deploy-linking-description
Browse files Browse the repository at this point in the history
Specify that KV stores and links can be created in non-interactive mode
  • Loading branch information
kate-goldenring committed Jan 29, 2024
2 parents de9fe50 + 9a2240e commit 80d1c0c
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit 80d1c0c

Please sign in to comment.