Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Check that the --kernel-manifest path points to a file named `Cargo…
….toml`
  • Loading branch information
phil-opp committed Feb 22, 2021
1 parent 3c1dfc4 commit 38fd486
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions build.rs
Expand Up @@ -204,6 +204,15 @@ mod binary {
Err(env::VarError::NotUnicode(_)) => {
panic!("The KERNEL_MANIFEST environment variable contains invalid unicode")
}
Ok(path)
if Path::new(&path).file_name().and_then(|s| s.to_str()) != Some("Cargo.toml") =>
{
format!(
"compile_error!(\"The given `--kernel-manifest` path `{}` does not \
point to a `Cargo.toml`\")",
path,
)
}
Ok(path) => {
println!("cargo:rerun-if-changed={}", path);

Expand Down

0 comments on commit 38fd486

Please sign in to comment.