File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 11use anyhow:: { Result , anyhow} ;
22use comfy_table:: Table ;
3- use std:: { fs, path:: Path } ;
3+ use std:: { fs, os :: unix :: fs :: symlink , path:: Path } ;
44
55use crate :: {
66 RepoCommands ,
@@ -9,9 +9,18 @@ use crate::{
99 utils:: resolve_repo,
1010} ;
1111
12- pub async fn repo_commands ( path : & Path , chunks_path : & Path , command : RepoCommands ) -> Result < ( ) > {
12+ pub async fn repo_commands (
13+ path : & Path ,
14+ chunk_store_path : & Path ,
15+ command : RepoCommands ,
16+ ) -> Result < ( ) > {
1317 match command {
14- RepoCommands :: Create { repo_name } => repo:: create ( & path. join ( & repo_name) , None ) ?,
18+ RepoCommands :: Create { repo_name } => {
19+ let repo_path = & path. join ( & repo_name) ;
20+
21+ repo:: create ( repo_path, None ) ?;
22+ symlink ( Path :: new ( "../../chunks" ) , repo_path. join ( "chunks" ) ) ?;
23+ }
1524
1625 RepoCommands :: List => {
1726 let mut table = Table :: new ( ) ;
You can’t perform that action at this time.
0 commit comments