Closed brianabston001 closed 5 years ago
Found and fixed this bug this morning. Please pull the release
branch and see if it resolves the issue. Thanks!
updated the release branch and see the changes but still get them same errors as above. I deleted the cache again and was able to run help one time and it has those errors and then the following time help will not run. Also tried to run the tfh curl-config -tfrc
and get the same thing
Figured this out. I had tested with busybox's awk, so I thought I had MacOS's One True AWK version covered. I had been using gawk, myself. Turns out that this is not sufficient, as busybox's version must have some fixes and enhancements beyond the One True AWK version shipped with MacOS.
The limitation is that awk on mac can't take a multiline string as a variable using, -v
like
$ shell_var="line 1
line 2"
$ awk -v sv="$shell_var" 'BEGIN {print sv}'
awk: newline in string line 1
line 2... at source line 1
The workaround is to send it as an arg and process it out of ARGV.
$ awk 'BEGIN {sv=ARGV[1]; delete ARGV[1]; print sv}' "$shell_var"
line 1
line 2
Release 0.2.3 should have this covered. I'll make sure not to rely on busybox's awk as a substitute for testing the one on MacOS.
Along the way I fixed some other things of course. Cheers!
When trying to run
tfh help
it will display the first time. Then after that it gives the following:If I try
tfh cache -clear
I get the same error. If I delete the cache folder I am able to run help again and it works but then the error comes back.Pretty much anything
tfh
I get the three lines above. Am I doing something wrong?