-
Notifications
You must be signed in to change notification settings - Fork 90
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
Constant variables are usable now #630
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
ProblemThere is a huge problem with Bash variables. They behave similarly to Example:local test=12
if [[ $test == "12" ]]; then
local test=24
echo $test # Outputs: 24
fi
echo $test # Outputs: 24 SolutionThis can be resolved in two ways:
I think that the second solution is far better. In it's case - I will check whether the variable has been declared in a scope before and add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor suggestions, but otherwise good to go.
First of all, I dislike the idea of adding |
You want me to remove the tests and add them separately in the new form in a new PR? I know that it's pretty messy but it adds extra work and brings little value. |
Fair enough, but in the future please don't combine separate issues into a single PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what did you exactly change to achieve the "usefulness"? the description is empty. i will not try to guess it by the diffs. please explain in the description what you have changed and why, and what is overall the thought process here
also, why are there new tests for arrays and failable functions? they seem totally irrelevant to this PR
@b1ek I moved the files from |
I'll write a description of what this PR does precisely |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets merge
declare -r
to a regular variable due to the problem of no ability to redeclare them in inner scopes like loops and functionserrors.rs
toerroring/
directory to align the testing logic with tests for validity and standard library