File tree 2 files changed +5
-13
lines changed
2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -169,9 +169,8 @@ impl<'cfg> Workspace<'cfg> {
169
169
/// indicating that something else should be passed.
170
170
pub fn current ( & self ) -> CargoResult < & Package > {
171
171
self . current_opt ( ) . ok_or_else ( ||
172
- format ! ( "manifest path `{}` is a virtual manifest, but this \
173
- command requires running against an actual package in \
174
- this workspace", self . current_manifest. display( ) ) . into ( )
172
+ format ! ( "manifest path `{}` contains no package: The manifest is virtual, \
173
+ and the workspace has no members.", self . current_manifest. display( ) ) . into ( )
175
174
)
176
175
}
177
176
Original file line number Diff line number Diff line change @@ -696,20 +696,13 @@ fn virtual_build_no_members() {
696
696
let p = project ( "foo" )
697
697
. file ( "Cargo.toml" , r#"
698
698
[workspace]
699
- "# )
700
- . file ( "bar/Cargo.toml" , r#"
701
- [project]
702
- name = "bar"
703
- version = "0.1.0"
704
- authors = []
705
- "# )
706
- . file ( "bar/src/main.rs" , "fn main() {}" ) ;
699
+ "# ) ;
707
700
p. build ( ) ;
708
701
assert_that ( p. cargo ( "build" ) ,
709
702
execs ( ) . with_status ( 101 )
710
703
. with_stderr ( "\
711
- error: manifest path `[..]` is a virtual manifest, but this command \
712
- requires running against an actual package in this workspace
704
+ error: manifest path `[..]` contains no package: The manifest is virtual, \
705
+ and the workspace has no members.
713
706
" ) ) ;
714
707
}
715
708
You can’t perform that action at this time.
0 commit comments