(repo_root: &std::path::Path, name: &str)
| 97 | |
| 98 | impl Create { |
| 99 | fn default_dest(repo_root: &std::path::Path, name: &str) -> PathBuf { |
| 100 | let repo_name = repo_root |
| 101 | .file_name() |
| 102 | .map(|s| s.to_string_lossy().into_owned()) |
| 103 | .unwrap_or_else(|| "repo".to_string()); |
| 104 | let parent = repo_root.parent().unwrap_or(repo_root); |
| 105 | parent.join(format!("{repo_name}-sandboxes")).join(name) |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | impl Command for Create { |