mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-28 20:16:52 -06:00
Merge pull request #1391 from sanyamsingh001/fix/cli-render-empty-r49
Honor --empty when rendering from the CLI
This commit is contained in:
@@ -691,11 +691,10 @@ fn render(args: &Args, json_out: bool) -> Result<(), Failure> {
|
||||
let mut s = session(args)?;
|
||||
if args.opt("--template").is_some() {
|
||||
template::prepare(&mut s, args)?;
|
||||
} else {
|
||||
match &args.project {
|
||||
Some(p) => s.execute("file.open", json!({"path": p})).map_err(|e| Failure::Error(e.to_string()))?,
|
||||
None => s.execute("file.openDemoProject", json!({})).map_err(|e| Failure::Error(e.to_string()))?,
|
||||
};
|
||||
} else if let Some(p) = &args.project {
|
||||
s.execute("file.open", json!({"path": p})).map_err(|e| Failure::Error(e.to_string()))?;
|
||||
} else if args.flag("--demo") || !args.flag("--empty") {
|
||||
s.execute("file.openDemoProject", json!({})).map_err(|e| Failure::Error(e.to_string()))?;
|
||||
}
|
||||
let err = |e: effectcraft_engine::EngineError| Failure::Error(e.to_string());
|
||||
if !args.flag("--queue") {
|
||||
|
||||
Reference in New Issue
Block a user