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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further refine the cases handled by --input-dir #991

Merged
merged 2 commits into from Oct 14, 2020

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Sep 29, 2020

This PR comes as a regression fix after seeing the comment from @janjongboom #765 (comment).

In arduino-cli 0.12.0 (and previous) using --input-dir path/to/firmware with a directory containing:

path/to/firmware/firmware.ino.bin
path/to/firmware/some_other_firmware_name.ino.bin

will not produce any error and the CLI will successfully upload using firmware.ino.bin (because the containing folder had the same name firmware as the file used for upload firmware.ino.bin).

After reintroducing the --input-file flag in #777 we had to change the search algorithm in the build-path folder, but to avoid regressions we also implemented a very long unit-test coverage... but the case listed above was not considered 馃う

This PR restore the previous behavior in that particular case and adds the case in the test coverage.

Using `--input-dir path/to/firmware` with a directory containing:

  path/to/firmware/firmware.ino.bin
  path/to/firmware/some_other_firmware_name.ino.bin

should not fail but select `firmware.ino.bin` for upload because the
containing folder has the same name.

See arduino#765 (comment)
@cmaglie cmaglie self-assigned this Sep 29, 2020
@cmaglie cmaglie merged commit 969473d into arduino:master Oct 14, 2020
@cmaglie cmaglie deleted the fix-upload-input-file-case-refined branch October 14, 2020 14:22
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.

None yet

2 participants