File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ serde_json = { version = "1.0", default-features = false }
18
18
tempfile = " 3.8"
19
19
tokio = { version = " 1.39" , features = [" full" ] }
20
20
toml = " 0.8.0"
21
- which = " 6.0.1"
22
21
jsonrpsee = { version = " 0.24.2" , features = [" http-client" , " ws-client" ] }
23
22
hex = { version = " 0.4.3" , default-features = false , features = [" serde" ] }
24
23
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ impl<C: Config> Node<C> {
89
89
}
90
90
91
91
fn spawn ( config : & C ) -> Result < SpawnOutput > {
92
- let citrea = get_citrea_path ( ) ;
92
+ let citrea = get_citrea_path ( ) ? ;
93
93
let dir = config. dir ( ) ;
94
94
95
95
let kind = C :: node_kind ( ) ;
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ use std::{
7
7
path:: { Path , PathBuf } ,
8
8
} ;
9
9
10
+ use anyhow:: anyhow;
10
11
use rand:: { distributions:: Alphanumeric , thread_rng, Rng } ;
11
- use which:: which;
12
12
13
13
use super :: Result ;
14
14
@@ -26,9 +26,11 @@ pub fn get_workspace_root() -> PathBuf {
26
26
. to_path_buf ( )
27
27
}
28
28
29
- /// Get citrea path from CITREA env or resolves to PATH using which.
30
- pub fn get_citrea_path ( ) -> PathBuf {
31
- std:: env:: var ( "CITREA" ) . map_or_else ( |_| which ( "citrea" ) . unwrap ( ) , PathBuf :: from)
29
+ /// Get citrea path from CITREA_E2E_TEST_BINARY env
30
+ pub fn get_citrea_path ( ) -> Result < PathBuf > {
31
+ std:: env:: var ( "CITREA_E2E_TEST_BINARY" )
32
+ . map ( PathBuf :: from)
33
+ . map_err ( |_| anyhow ! ( "CITREA_E2E_TEST_BINARY is not set. Cannot resolve citrea path" ) )
32
34
}
33
35
34
36
pub fn get_stdout_path ( dir : & Path ) -> PathBuf {
You can’t perform that action at this time.
0 commit comments