Skip to content

Commit a2b7197

Browse files
committed
profiles: catch invalid 'inherits' use on root profile
1 parent 01a0c24 commit a2b7197

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/cargo/core/profiles.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,15 @@ impl Profiles {
186186
}
187187
match name.as_str() {
188188
"dev" | "release" => {
189+
match &profile.inherits {
190+
None => {}
191+
Some(_) => {
192+
failure::bail!(
193+
"An 'inherits' must not specified root profile '{}'",
194+
name
195+
);
196+
}
197+
}
189198
continue;
190199
}
191200
_ => {}

0 commit comments

Comments
 (0)