Skip to content

Commit 3b3ecad

Browse files
committed
dont require frozen or locked cargo
1 parent f29f864 commit 3b3ecad

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

integration-tests/src/lib.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@ use cargo::core::compiler::{Compilation, CompileMode};
1111
use cargo::util::errors::CargoResult;
1212
use postgres::Connection;
1313

14+
fn configure_cargo() -> CargoResult<cargo::Config> {
15+
let mut cfg = cargo::util::config::Config::default()?;
16+
cfg.configure(0, None, &None, false, false, false, &None, &[])?;
17+
18+
Ok(cfg)
19+
}
20+
1421
pub fn build_lib(name: &str) -> CargoResult<PathBuf> {
1522
println!("building library: {}", name);
16-
let cfg = cargo::util::config::Config::default()?;
23+
let cfg = configure_cargo()?;
1724

1825
let mut opts = cargo::ops::CompileOptions::new(&cfg, CompileMode::Build)
1926
.expect("failed to get compile options");
@@ -49,7 +56,7 @@ pub fn build_lib(name: &str) -> CargoResult<PathBuf> {
4956

5057
pub fn build_bin(name: &str) -> CargoResult<PathBuf> {
5158
println!("building binary: {}", name);
52-
let cfg = cargo::util::config::Config::default()?;
59+
let cfg = configure_cargo()?;
5360

5461
let mut opts = cargo::ops::CompileOptions::new(&cfg, CompileMode::Build)
5562
.expect("failed to get compile options");

0 commit comments

Comments
 (0)