Skip to content

Conversation

romainreignier
Copy link
Contributor

When using the monitor subcommand, two questions are asked by espflash:

✔ Use serial port '/dev/ttyACM0' - USB JTAG/serial debug unit? · yes
✔ Remember this serial port for future use? · yes

thread 'main' panicked at /home/rre/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/espflash-3.3.0/src/cli/config.rs:159:48:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

If yes is answered to the question: "Remember this serial port for future use?" the program panic because the save_path variable of the espflash Config is not initialized to a valid directory to store a persistent configuration.

Using the load() function allows to skip the questions on next use.

Using the default() configuration, if 'y' is answered to the question:
"Remember this serial port for future use?" the program panic because
the `save_path` variable of the espflash Config is not initialized to
a valid directory to store a persistent configuration.

Using the load() function allows to skip the questions on next use.
@ivmarkov
Copy link
Collaborator

It skips the questions but what happens in addition?
Is it creating some sort of espflash.toml hidden somewhere? If yes, I'm not sure we actually want that? We probably want - if the user had not specified a serial port in the espfactory.toml conf - that the user is asked about the port every time, and moreover, the user should not be asked about "shall I save this port for next time".

@romainreignier
Copy link
Contributor Author

If the user has an espflash config file in the current or parent Dir or $HOME/.config/espflash then the questions are skipped and the found USB ids are used.
Otherwise, if yes is answered to the second question, a new file is created in $HOME/.config/espflash.
Skipping the second question will need some changes in espflash I think.

@ivmarkov
Copy link
Collaborator

Sorry for the delay here. Will follow up over the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants