File tree Expand file tree Collapse file tree 2 files changed +15
-12
lines changed Expand file tree Collapse file tree 2 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " cpkg"
3
3
description = " A dead simple C package manager."
4
- version = " 0.8.2 "
4
+ version = " 0.8.3 "
5
5
edition = " 2021"
6
6
7
7
authors = [
" David Cruz <[email protected] >" ]
Original file line number Diff line number Diff line change @@ -571,20 +571,23 @@ fn main() -> anyhow::Result<()> {
571
571
let now = std:: time:: Instant :: now ( ) ;
572
572
573
573
for ( name, dep) in & config. dependencies {
574
+ let dep_path = build. join ( name) ;
575
+
576
+ if dep_path. exists ( ) {
577
+ continue ;
578
+ }
579
+
574
580
match dep {
575
581
ConfigDependency :: Git { git } => {
576
- let path = build. join ( name) ;
577
-
578
- if !path. exists ( ) {
579
- std:: process:: Command :: new ( & git_cmd)
580
- . arg ( "clone" )
581
- . arg ( git)
582
- . arg ( path)
583
- . spawn ( ) ?;
584
- }
582
+ std:: process:: Command :: new ( & git_cmd)
583
+ . arg ( "clone" )
584
+ . arg ( git)
585
+ . arg ( dep_path)
586
+ . spawn ( ) ?;
585
587
} ,
586
- _ => {
587
- anyhow:: bail!( "Unsupported dependency type" ) ;
588
+
589
+ ConfigDependency :: Path { path } => {
590
+ std:: fs:: hard_link ( path, dep_path) ?;
588
591
}
589
592
}
590
593
}
You can’t perform that action at this time.
0 commit comments