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 @@ -50,11 +50,15 @@ pub struct SaveImageOpts {
50
50
51
51
fn main ( ) -> Result < ( ) > {
52
52
miette:: set_panic_hook ( ) ;
53
+
53
54
let mut opts = Opts :: parse ( ) ;
54
55
let config = Config :: load ( ) ;
55
56
56
- // if only a single argument is passed, it's always the elf
57
- if opts. image . is_none ( ) && config. connection . serial . is_some ( ) {
57
+ // If only a single argument is passed, it's always going to be the ELF file. In
58
+ // the case that the serial port was not provided as a command-line argument,
59
+ // we will either load the value specified in the configuration file or do port
60
+ // auto-detection instead.
61
+ if opts. image . is_none ( ) && opts. connect_args . serial . is_some ( ) {
58
62
swap ( & mut opts. image , & mut opts. connect_args . serial ) ;
59
63
}
60
64
You can’t perform that action at this time.
0 commit comments