File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1022,7 +1022,7 @@ fn update_manifest_with_new_member(
1022
1022
}
1023
1023
}
1024
1024
}
1025
- } else {
1025
+ } else if workspace_document . contains_key ( "workspace" ) {
1026
1026
let ws = workspace_document[ "workspace" ]
1027
1027
. as_table_mut ( )
1028
1028
. with_context ( || format ! ( "[workspace] is not a table" ) ) ?;
@@ -1050,6 +1050,11 @@ fn update_manifest_with_new_member(
1050
1050
}
1051
1051
1052
1052
ws. insert ( "members" , toml_edit:: value ( array) ) ;
1053
+ } else {
1054
+ let mut array = Array :: new ( ) ;
1055
+ array. push ( relpath) ;
1056
+ array. decor_mut ( ) . set_suffix ( "\n " ) ;
1057
+ workspace_document[ "workspace" ] [ "members" ] = toml_edit:: value ( array) ;
1053
1058
}
1054
1059
1055
1060
paths:: write ( & root_manifest_path, workspace_document. to_string ( ) )
You can’t perform that action at this time.
0 commit comments