Skip to content

Default empty value for variable not defined#2376

Merged
seefood merged 1 commit intoBash-it:masterfrom
BarbUk:default_value
Apr 5, 2026
Merged

Default empty value for variable not defined#2376
seefood merged 1 commit intoBash-it:masterfrom
BarbUk:default_value

Conversation

@BarbUk
Copy link
Copy Markdown
Contributor

@BarbUk BarbUk commented Apr 4, 2026

Description

Fix unset variable by using a default empty value.

Motivation and Context

Using set -eu gave error for variable test with test -n if the variable does not exists.

How Has This Been Tested?

Running the theme with set -eu

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • [C] If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh. (CF: Lint files #2378)
  • I have added tests to cover my changes, and all the new and existing tests pass.

@BarbUk
Copy link
Copy Markdown
Contributor Author

BarbUk commented Apr 4, 2026

#2378 should be merged before for the CI to pass.

@seefood seefood merged commit 24de608 into Bash-it:master Apr 5, 2026
4 of 6 checks passed
@BarbUk BarbUk deleted the default_value branch April 5, 2026 17:31
@BarbUk
Copy link
Copy Markdown
Contributor Author

BarbUk commented Apr 5, 2026

Thanks :)

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