let config_paths = configs.find(&("paths".to_owned())).map(|v| v.clone()).unwrap_or_else(|| ConfigValue::new());
- let paths = match config_paths.get_value() {
+ let mut paths: Vec<Path> = match config_paths.get_value() {
&config::String(_) => return Err(CLIError::new("The path was configured as a String instead of a List", None, 1)),
&config::List(ref list) => list.iter().map(|path| Path::new(path.as_slice())).collect()
};
+ paths.push(Path::new(manifest_path).dir_path());
+
let source = PathSource::new(paths);
let summaries = try!(source.list().to_result(|err|
CLIError::new(format!("Unable to list packages from {}", source), Some(err.to_str()), 1)));
}
// Currently doesn't pass due to the code being broken
-test!(cargo_compile_with_explicit_manifest_path {
+test!(cargo_compile {
let p = project("foo")
.file("Cargo.toml", r#"
[project]
.file("src/foo.rs", r#"
fn main() {
println!("i am foo");
- }"#)
+ }
+ "#)
.build();
- println!("~~~~~~~");
- p.cargo_process("cargo")
- .args(["compile".to_owned(), "--manifest-path".to_owned(), "Cargo.toml".to_owned()])
+ p.cargo_process("cargo-compile")
+ .args([])
.exec()
.unwrap();
- println!("~~~~~~~");
assert_that(&p.root().join("target/foo"), existing_file());