gobolinux / Compile

The GoboLinux build tool
52 stars 15 forks source link

Updated ApplyVariables to make use of Bash-5.0 ideas #57

Closed sage-etcher closed 3 months ago

sage-etcher commented 3 months ago

For Compile Issue #47

notes: Tested against the 017-GIT version (unmodified), successful output was identical, as were the tested (non-fatal) error states. However the output for many fatal errors is different, previously you would see python errors or cat errors, however now the majority of them should be handled by/show output from the Die function.

With the new Die based error messages, it may be helpful to eventually add a --no-color option in the future. I have no plans of implementing it at the moment, just wanted to take note of it.

in testing, non-fatal error also showed identical responses when fed malformed data. An example being:

1:'@%VAR1%@' 2:'@%VAR2%@' 3:'@%VAR3%@'  # good  outputs  1:'value1' 2:'value2' 3:'value3'
1:'@%VAR1' 2:'@%VAR2%@' 3:'@%VAR3%@'    # bad   outputs  1:'' 3:'value3'
1:'%@VAR1@%'                            # bad   hangs perpetually

I'm unsure what line of code is causing the 3rd example to hang, nor do I have plans of fixing it at the moment; I am simply making note of its existance.

Nuc1eoN commented 3 months ago

Thanks for the effort. But it seems the current consensus is not to follow the path of mass updating the current codebase to bash 5.0.

But bug fixes to the current code base are still appreciated.