File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
use super :: eip712:: Resolver ;
2
- use clap:: Parser ;
2
+ use clap:: { Parser , ValueHint } ;
3
3
use eyre:: { Ok , Result } ;
4
4
use foundry_cli:: { opts:: CoreBuildArgs , utils:: LoadConfig } ;
5
5
use foundry_common:: { compile:: with_compilation_reporter, fs} ;
@@ -28,6 +28,10 @@ foundry_config::impl_figment_convert!(BindJsonArgs, opts);
28
28
/// CLI arguments for `forge bind-json`.
29
29
#[ derive( Clone , Debug , Parser ) ]
30
30
pub struct BindJsonArgs {
31
+ /// The path to write bindings to.
32
+ #[ arg( value_hint = ValueHint :: FilePath , value_name = "PATH" ) ]
33
+ pub out : Option < PathBuf > ,
34
+
31
35
#[ command( flatten) ]
32
36
opts : CoreBuildArgs ,
33
37
}
@@ -58,7 +62,7 @@ impl BindJsonArgs {
58
62
let config = self . try_load_config_emit_warnings ( ) ?;
59
63
let project = config. create_project ( false , true ) ?;
60
64
61
- let target_path = config. root . 0 . join ( & config. bind_json . out ) ;
65
+ let target_path = config. root . 0 . join ( self . out . as_ref ( ) . unwrap_or ( & config. bind_json . out ) ) ;
62
66
63
67
let sources = project. paths . read_input_files ( ) ?;
64
68
let graph = Graph :: < MultiCompilerParsedSource > :: resolve_sources ( & project. paths , sources) ?;
You can’t perform that action at this time.
0 commit comments