(binary: &Path, root: &Path, config: &Path, args: &[&str])
| 33 | ) |
| 34 | } |
| 35 | fn cli(binary: &Path, root: &Path, config: &Path, args: &[&str]) -> Result<Value> { |
| 36 | let result = attempt(binary, root, config, args)?; |
| 37 | if result["success"] != true { |
| 38 | return Err(format!("atomic {:?} failed: {}", args, result).into()); |
| 39 | } |
| 40 | Ok(result) |
| 41 | } |
| 42 | fn fresh(binary: &Path, root: &Path, config: &Path, url: &str, view: &str) -> Result<()> { |
| 43 | drop(Repository::init(root)?); |
| 44 | cli( |