Warn when Cargo is run directly. Fix #3957.

This commit is contained in:
Simon Sapin 2014-11-28 16:40:52 +00:00
parent 2f413c8937
commit ff4877b473
3 changed files with 21 additions and 0 deletions

2
.gitignore vendored
View file

@ -1,4 +1,6 @@
/.cargo/config
/Cargo.lock
/target
/components/servo/target
/ports/cef/target
/ports/android/bin

10
Cargo.toml Normal file
View file

@ -0,0 +1,10 @@
[package]
name = "not-the-toml-you-re-looking-for"
version = "0.0.1"
authors = ["The Servo Project Developers"]
build = "support/not-the-toml-you-re-looking-for.rs"
[lib]
name = "not-the-toml-you-re-looking-for"

View file

@ -0,0 +1,9 @@
fn main() {
::std::os::set_exit_status(1);
let _ = ::std::io::stderr().write(br"
This is not the `Cargo.toml` file you're looking for.
Invoke Cargo through mach instead, e.g. `./mach build`.
");
}