Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli: Prevent weird `rad issue open` behavior
Slack Coder committed 2 years ago
commit 16822ff84ee14561576572780e3f8662b92e5458
parent 5d20316c57a142bafef7123e19a8889c37321673
1 file changed +4 -2
modified radicle-cli/src/commands/issue.rs
@@ -507,10 +507,12 @@ fn prompt_issue(
        serde_yaml::from_str(&meta).context("failed to parse yaml front-matter")?;

    meta.title = meta.title.trim().to_string();
-
    if meta.title.is_empty() {
+
    if meta.title.is_empty() || meta.title == "~" || meta.title == "null" {
+
        // '~' and 'null' are YAML's string values for null and unexpectedly replace empty fields
+
        // for String.
        return Err(io::Error::new(
            io::ErrorKind::InvalidInput,
-
            "an issue title must be provided",
+
            "an issue title must be provided and may not be '~' or 'null'",
        )
        .into());
    }