Conversation
rewrote the scripts to use features that are available in both ash and bash. I think the largest change is the switch to no longer use bash arrays, and the use of [ over [[, although it seems alpine-latest has some [[ executable although i'm not sure if that would exist on older alpine versions we'd want to support.
the previous iteration was not properly handling spaces in arguments that users would pass and in the eval that runs the codecov command, those args would get split by their spaces, so now we quote the arguments and we escape whatever quotes they may contain.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #59 +/- ##
=======================================
Coverage 97.14% 97.14%
=======================================
Files 2 2
Lines 35 35
=======================================
Hits 34 34
Misses 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
thomasrockhu-codecov
left a comment
There was a problem hiding this comment.
Please aggressively test this out withe changing args from an array to a string. I'm pretty sure this won't work and it'll break functionality, but I could be wrong
.github/workflows/ci.yml
Outdated
| - pull_request | ||
| jobs: | ||
| run: | ||
| test: |
There was a problem hiding this comment.
| test: | |
| test-linux: |
| say "$g ->$x Token length: ${#token}" | ||
| token_str="" | ||
| token_arg=() | ||
| token_arg="" |
There was a problem hiding this comment.
oh this might break things. there's a reason this has to be an array as the string command gets kind of messed up when you run the command
There was a problem hiding this comment.
arrays don't exist in ash 😭
it seems like the way to make sure that the string command does not get messed up is by wrapping all arguments in single quotes, which is fine because i don't think we need double quotes (which allows for substituting in the values of variables, my assumption is that anything the codecov sh gets passed will already have variables substituted in)
rewrote the scripts to use features that are available in both ash and
bash. I think the largest change is the switch to no longer use bash
arrays, and the use of [ over [[, although it seems alpine-latest
has some [[ executable although i'm not sure if that would exist on
older alpine versions we'd want to support.