File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -94,9 +94,6 @@ impl Cloup {
9494 ErrorKind :: PermissionDenied => {
9595 eprintln ! ( "Permission denied when creating config directory" )
9696 }
97- ErrorKind :: AlreadyExists => {
98- eprintln ! ( "Config directory already exists" )
99- }
10097 _ => ( ) ,
10198 }
10299 }
@@ -108,12 +105,19 @@ impl Cloup {
108105 format ! ( "template_dir={:?}" , current_dir) ,
109106 )
110107 . expect ( "An error occurred when writing config file" ) ;
108+
109+ println ! ( "📚 Successfully made this the template directory for cloups" ) ;
111110 }
112111
113112 pub fn create ( & self , name : & str , files : Vec < String > ) {
114113 let current_dir = & self . current_dir ;
115114 let template_dir = self . template_dir . join ( & name) ;
116115
116+ if name. starts_with ( '.' ) {
117+ eprintln ! ( "Name of template should not start with a dot" ) ;
118+ process:: exit ( 1 ) ;
119+ }
120+
117121 if fs:: create_dir ( & template_dir) . is_err ( ) {
118122 eprintln ! ( "Template {} already exists" , & name. bright_purple( ) ) ;
119123 process:: exit ( 1 ) ;
You can’t perform that action at this time.
0 commit comments