Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying export file via ESPUP_EXPORT_FILE #403

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

sirhcel
Copy link
Contributor

@sirhcel sirhcel commented Dec 6, 2023

This adds support for specifying the location of the export file via the environment variable ESPUP_EXPORT_FILE. So one does not have to remember to explicitly specify --export-file FILE when installling or updating with a custom location of that file.

@sirhcel sirhcel marked this pull request as ready for review December 6, 2023 19:09
Copy link
Member

@SergioGasquez SergioGasquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks for the contribution!

I think clap offers a more simple version of doing this by including the env attribute in the args of the export_file as in https://github.com/esp-rs/espflash/blob/main/espflash/src/cli/mod.rs#L62

This also autogenerates the help, eg:

  -p, --port <PORT>
          Serial port connected to target device

          [env: ESPFLASH_PORT=]

@sirhcel
Copy link
Contributor Author

sirhcel commented Dec 11, 2023

You are absolutely right. I tricked myself by just grepping for export-file and believing in magic afterwards. 😅 Fixed.

Copy link
Member

@SergioGasquez SergioGasquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the contribution!

@SergioGasquez SergioGasquez merged commit a311fb9 into esp-rs:main Dec 12, 2023
17 checks passed
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