Skip to content

Conversation

joseph-sentry
Copy link
Contributor

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.

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.
Copy link

codecov bot commented Jun 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.14%. Comparing base (ddd9a51) to head (6f27e35).

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           
Flag Coverage Δ
flag1 97.14% <ø> (ø)
flag2 97.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@thomasrockhu-codecov thomasrockhu-codecov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

- push
- pull_request
jobs:
run:
test:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
test:
test-linux:

@@ -11,20 +11,22 @@ else
fi
say "$g ->$x Token length: ${#token}"
token_str=""
token_arg=()
token_arg=""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

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.

2 participants