File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
tests/testsuite/init/formats_source Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
use cargo_test_support:: compare:: assert_ui;
2
2
use cargo_test_support:: prelude:: * ;
3
- use cargo_test_support:: Project ;
3
+ use cargo_test_support:: { process , Project } ;
4
4
5
5
use cargo_test_support:: curr_dir;
6
6
7
- #[ cargo_test( requires_rustfmt ) ]
7
+ #[ cargo_test]
8
8
fn formats_source ( ) {
9
+ // This cannot use `requires_rustfmt` because rustfmt is not available in
10
+ // the rust-lang/rust environment. Additionally, if running cargo without
11
+ // rustup (but with rustup installed), this test also fails due to HOME
12
+ // preventing the proxy from choosing a toolchain.
13
+ if let Err ( e) = process ( "rustfmt" ) . arg ( "-V" ) . exec_with_output ( ) {
14
+ eprintln ! ( "skipping test, rustfmt not available:\n {e:?}" ) ;
15
+ return ;
16
+ }
9
17
let project = Project :: from_template ( curr_dir ! ( ) . join ( "in" ) ) ;
10
18
let project_root = & project. root ( ) ;
11
19
You can’t perform that action at this time.
0 commit comments