Skip to content

fix(scripts/cassandra-harry): Fixing bash if condition#13

Merged
ifesdjeen merged 1 commit intoapache:trunkfrom
Orenef11:fix_cassandra_harry
Jan 19, 2022
Merged

fix(scripts/cassandra-harry): Fixing bash if condition#13
ifesdjeen merged 1 commit intoapache:trunkfrom
Orenef11:fix_cassandra_harry

Conversation

@Orenef11
Copy link
Contributor

The correct way to check if variable is set is:

if [ -z ${var+x} ]; then
   echo "var is unset"
else
   echo "var is set to '$var'"
fi

For more information please check the following link:
https://stackoverflow.com/questions/3601515/how-to-check-if-a-variable-is-set-in-bash

The correct way to check if variable is set is:
```bash
if [ -z ${var+x} ]; then
   echo "var is unset"
else
   echo "var is set to '$var'"
fi
```

For more information please check the following link:
https://stackoverflow.com/questions/3601515/how-to-check-if-a-variable-is-set-in-bash
@roydahan
Copy link

@ifesdjeen could you please review and merge?

@Orenef11
Copy link
Contributor Author

@ifesdjeen could you please review and merge?

I've opened a new bug for this change
https://issues.apache.org/jira/browse/CASSANDRA-17270

@ifesdjeen ifesdjeen merged commit 8c2112b into apache:trunk Jan 19, 2022
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.

3 participants