File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 11use camino:: { Utf8Path , Utf8PathBuf } ;
22use serde:: Deserialize ;
3- use snafu:: { ResultExt , Snafu } ;
3+ use snafu:: { OptionExt , ResultExt , Snafu } ;
44
55use icp_fs:: yaml:: { LoadYamlFileError , load_yaml_file} ;
66
@@ -42,7 +42,12 @@ impl ProjectManifest {
4242 let mut cs = Vec :: new ( ) ;
4343
4444 for pattern in pm. canisters {
45- let matches = glob:: glob ( pattern. as_str ( ) ) . context ( GlobPatternSnafu { pattern } ) ?;
45+ let mdir = mpath
46+ . parent ( )
47+ . context ( ProjectDirectorySnafu { path : mpath } ) ?;
48+
49+ let matches =
50+ glob:: glob ( mdir. join ( & pattern) . as_str ( ) ) . context ( GlobPatternSnafu { pattern } ) ?;
4651
4752 for cpath in matches {
4853 let cpath = cpath. context ( GlobWalkSnafu { path : mpath } ) ?;
@@ -66,6 +71,9 @@ impl ProjectManifest {
6671
6772#[ derive( Debug , Snafu ) ]
6873pub enum LoadProjectManifestError {
74+ #[ snafu( display( "failed to find project directory for project manifest {path}" ) ) ]
75+ ProjectDirectory { path : Utf8PathBuf } ,
76+
6977 #[ snafu( transparent) ]
7078 Parse { source : LoadYamlFileError } ,
7179
You can’t perform that action at this time.
0 commit comments