Skip to content

Conversation

p12tic
Copy link
Contributor

@p12tic p12tic commented Mar 12, 2025

Currently single-value options such as --tunnel will accept multiple values, e.g. --tunnel "<...>" --tunnel "<...>". Confusingly for the user only the last value will be used without any warning.

This commit fixes this by emitting an error message and exiting the program if multiple option values were supplied when single value was expected.

There are several more cases where this same approach could be applied, but these are not as trivial to map to the newly added function (e.g. result["terminal-path"].as<string>()), so I left them as is.

@p12tic
Copy link
Contributor Author

p12tic commented Mar 12, 2025

CirctleCI tests fail because "Job was rejected because resource class medium, image ubuntu-2004:202101-01 is not a valid resource class ".

@MisterTea
Copy link
Owner

Thanks!

@MisterTea
Copy link
Owner

@p12tic your PR is failing CI. Can you take a look? The circle CI tests are broken but the others should pass.

Currently single-value options such as --tunnel will accept multiple
values, e.g. --tunnel "<...>" --tunnel "<...>". Confusingly for the user
only the last value will be used without any warning.

This commit fixes this by emitting an error message and exiting the
program if multiple option values were supplied when single value was
expected.
@p12tic p12tic force-pushed the disallow-multiple-options-for-single-value-options branch from 1f37678 to d0cb452 Compare March 13, 2025 20:33
@p12tic
Copy link
Contributor Author

p12tic commented Mar 13, 2025

@MisterTea Should be good now. Sorry for wasting your time with the first iteration, I should have been more careful.

@p12tic
Copy link
Contributor Author

p12tic commented Mar 19, 2025

@MisterTea Just a friendly ping :) Thanks a lot for your time.

@MisterTea
Copy link
Owner

Thanks!!

@MisterTea MisterTea merged commit 812814b into MisterTea:master Mar 19, 2025
22 of 24 checks passed
@p12tic p12tic deleted the disallow-multiple-options-for-single-value-options branch March 20, 2025 01:45
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