Skip to content

paper: Fix boolean flag always return true#4134

Merged
itzg merged 1 commit into
itzg:masterfrom
harrisonablack:fix/serverLibraryCleanupPaper
Jun 25, 2026
Merged

paper: Fix boolean flag always return true#4134
itzg merged 1 commit into
itzg:masterfrom
harrisonablack:fix/serverLibraryCleanupPaper

Conversation

@harrisonablack

@harrisonablack harrisonablack commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Bug in the scripts/start-deployPaper script

When checking if we pass the --clean-libraries flag, we check if the var $CLEAN_SERVER_LIBRARIES is set

Previously this was checked by

if [[ $CLEAN_SERVER_LIBRARIES ]]; then
  args+=(--clean-libraries)
fi

However performing the test operator [[ on a variable will only return false if the variable is empty, not if it is "false". e.g.

[[ true ]]  # true
[[ false ]] # true
[[ "" ]].   # false

Fix replaces test operator with isTrue $CLEAN_SERVER_LIBRARIES, utilising isTrue function from scripts/start-utils

Test operator when passed in a string checks if the string is not empty,
it does not check the expression inside, e.g. [[ "false" ]] returns true
because the string is non-empty. Replace test operator with isTrue

@itzg itzg left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Ah yep

@itzg itzg added the bug label Jun 25, 2026
@itzg itzg changed the title fix(serverLibraryCleanupPaper): Fix boolean flag always return true paper: Fix boolean flag always return true Jun 25, 2026
@itzg itzg merged commit 292b2f7 into itzg:master Jun 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants