diff --git a/crates/aura-cli/src/research_docs.rs b/crates/aura-cli/src/research_docs.rs index 4338930..44b4912 100644 --- a/crates/aura-cli/src/research_docs.rs +++ b/crates/aura-cli/src/research_docs.rs @@ -263,6 +263,15 @@ fn register_process(file: &PathBuf, env: &Env) -> Result<(), String> { } fn show_process(id: &str, env: &Env) -> Result<(), String> { + if env.provenance().is_none() { + let cwd = std::env::current_dir() + .map(|d| d.display().to_string()) + .unwrap_or_default(); + return Err(format!( + "process show needs a project: the document store lives under the \ + project store root (no Aura.toml found up from {cwd})" + )); + } let registry = env.registry(); match registry.get_process(id).map_err(|e| e.to_string())? { Some(bytes) => { @@ -584,6 +593,15 @@ fn register_campaign(file: &PathBuf, env: &Env) -> Result<(), String> { } fn show_campaign(id: &str, env: &Env) -> Result<(), String> { + if env.provenance().is_none() { + let cwd = std::env::current_dir() + .map(|d| d.display().to_string()) + .unwrap_or_default(); + return Err(format!( + "campaign show needs a project: the document store lives under the \ + project store root (no Aura.toml found up from {cwd})" + )); + } let registry = env.registry(); match registry.get_campaign(id).map_err(|e| e.to_string())? { Some(bytes) => {