|
1 | 1 | //! Tests for the `cargo build` command.
|
2 | 2 |
|
3 | 3 | use cargo::{
|
4 |
| - core::compiler::CompileMode, core::Workspace, ops::CompileOptions, |
5 |
| - util::paths::dylib_path_envvar, Config, |
| 4 | + core::compiler::CompileMode, |
| 5 | + core::{Shell, Workspace}, |
| 6 | + ops::CompileOptions, |
| 7 | + util::paths::dylib_path_envvar, |
| 8 | + Config, |
6 | 9 | };
|
7 | 10 | use cargo_test_support::paths::{root, CargoPathExt};
|
8 | 11 | use cargo_test_support::registry::Package;
|
9 | 12 | use cargo_test_support::{
|
10 | 13 | basic_bin_manifest, basic_lib_manifest, basic_manifest, is_nightly, lines_match, main_file,
|
11 |
| - project, rustc_host, sleep_ms, symlink_supported, t, Execs, ProjectBuilder, |
| 14 | + paths, project, rustc_host, sleep_ms, symlink_supported, t, Execs, ProjectBuilder, |
12 | 15 | };
|
13 | 16 | use std::env;
|
14 | 17 | use std::fs;
|
@@ -427,7 +430,8 @@ fn cargo_compile_api_exposes_artifact_paths() {
|
427 | 430 | .file("src/bin.rs", "pub fn main() {}")
|
428 | 431 | .build();
|
429 | 432 |
|
430 |
| - let config = Config::default().unwrap(); |
| 433 | + let shell = Shell::from_write(Box::new(Vec::new())); |
| 434 | + let config = Config::new(shell, env::current_dir().unwrap(), paths::home()); |
431 | 435 | let ws = Workspace::new(&p.root().join("Cargo.toml"), &config).unwrap();
|
432 | 436 | let compile_options = CompileOptions::new(ws.config(), CompileMode::Build).unwrap();
|
433 | 437 |
|
|
0 commit comments