upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/ngit/sub_commands/init.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bin/ngit/sub_commands/init.rs b/src/bin/ngit/sub_commands/init.rs
index 9479032..f348c0d 100644
--- a/src/bin/ngit/sub_commands/init.rs
+++ b/src/bin/ngit/sub_commands/init.rs
@@ -1,5 +1,6 @@
1use std::{ 1use std::{
2 collections::HashMap, 2 collections::HashMap,
3 env,
3 process::{Command, Stdio}, 4 process::{Command, Stdio},
4 str::FromStr, 5 str::FromStr,
5 thread, 6 thread,
@@ -111,6 +112,12 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
111 repo_ref.name.clone() 112 repo_ref.name.clone()
112 } else if let Some(coordinate) = &repo_coordinate { 113 } else if let Some(coordinate) = &repo_coordinate {
113 coordinate.identifier.clone() 114 coordinate.identifier.clone()
115 } else if let Ok(path) = env::current_dir() {
116 if let Some(current_dir_name) = path.file_name() {
117 current_dir_name.to_string_lossy().to_string()
118 } else {
119 String::new()
120 }
114 } else { 121 } else {
115 String::new() 122 String::new()
116 }), 123 }),