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

feat: Make command parsing support operations on param expansions #266

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

nat-n
Copy link
Owner

@nat-n nat-n commented Dec 27, 2024

Specifically cmd tasks may now use the following operations like in bash

  • :- fallback value, e.g. ${AWS_REGION:-us-east-1}
  • :+ value replacement, e.g. ${AWESOME:+--awesome-mode}

This was done by adding AST parser support for Param Expansion operators

Also:

  • Fix bug in param expansion logic for pure whitespace param values
  • Add env paramater to PoeThePoet class to override os.environ for testing

@nat-n nat-n changed the title Make command parsing support operations on param expansions feat: Make command parsing support operations on param expansions Dec 27, 2024
Specifically cmd tasks may now use the following operations like in bash
- `:-` fallback value, e.g. ${AWS_REGION:-us-east-1}
- `:+` value replacement, e.g. ${AWESOME:+--awesome-mode}

This was done by adding AST parser support for Param Expansion operators

Also:
- Fix bug in param expansion logic for pure whitespace param values
- Add env paramater to PoeThePoet class to override os.environ for testing
@nat-n nat-n merged commit 68e9e9b into development Dec 27, 2024
20 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.

1 participant