File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ reqwest = { version = "0.12.23", optional = true }
2626serde = { version = " 1.0.219" , features = [" derive" ] }
2727serde_yaml = " 0.9.34"
2828tar = " 0.4.44"
29- tokio = { version = " 1.47.1" , optional = true }
29+ tokio = { version = " 1.47.1" , optional = true , features = [ " rt " ] }
3030walkdir = " 2.5.0"
3131
3232[dev-dependencies ]
Original file line number Diff line number Diff line change @@ -113,9 +113,8 @@ pub fn install_tree(
113113 mirrors : & [ String ] ,
114114 hash_kind : HashKind ,
115115) -> Result < ( ) > {
116- use tokio:: runtime:: Runtime ;
117-
118116 use crate :: chunks:: network:: install_chunks;
117+ use tokio:: runtime:: Runtime ;
119118
120119 let mut not_installed_chunks = Vec :: new ( ) ;
121120
Original file line number Diff line number Diff line change @@ -157,9 +157,7 @@ pub fn get_all_installed_packages(repo_path: &Path) -> Result<Vec<PackageManifes
157157 let mut packages = Vec :: new ( ) ;
158158 let installed_path = & repo_path. join ( "installed" ) ;
159159
160- if !installed_path. exists ( ) {
161- Ok ( Vec :: new ( ) )
162- } else {
160+ if installed_path. exists ( ) {
163161 // Check ID's and aliases
164162 for entry in fs:: read_dir ( installed_path) ? {
165163 let file = entry?. path ( ) ;
@@ -169,6 +167,8 @@ pub fn get_all_installed_packages(repo_path: &Path) -> Result<Vec<PackageManifes
169167 }
170168
171169 Ok ( packages)
170+ } else {
171+ Ok ( Vec :: new ( ) )
172172 }
173173}
174174
You can’t perform that action at this time.
0 commit comments