File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,19 @@ use std::path::Path;
2828
2929const DERIVE_EQ_HASH : & str = "#[derive(Eq, Hash)]" ;
3030const DERIVE_EQ_HASH_COPY : & str = "#[derive(Copy, Eq, Hash)]" ;
31+ const SERVICES_FOLDER : & str = "./protobufs/services" ;
3132
3233fn main ( ) -> anyhow:: Result < ( ) > {
3334 // services is the "base" module for the hedera protobufs
3435 // in the beginning, there was only services and it was named "protos"
3536
36- let services: Vec < _ > = read_dir ( "./protobufs/services" ) ?
37+ let services_path = Path :: new ( SERVICES_FOLDER ) ;
38+
39+ if !services_path. is_dir ( ) {
40+ anyhow:: bail!( "Folder {SERVICES_FOLDER} does not exist; do you need to `git submodule update --init`?" ) ;
41+ }
42+
43+ let services: Vec < _ > = read_dir ( services_path) ?
3744 . filter_map ( |entry| {
3845 let entry = entry. ok ( ) ?;
3946 entry. file_type ( ) . ok ( ) ?. is_file ( ) . then ( || entry. path ( ) )
You can’t perform that action at this time.
0 commit comments