File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,31 @@ runs:
201201 await io.mkdirP(gnupgHome);
202202 fs.chmodSync(gnupgHome, 0o700);
203203
204+ # Fix pkgxdev curl's .curlrc which contains unexpanded environment variables
205+ - name : Fix curl configuration
206+ if : always() && contains(steps.check-codecov-deps.outputs.missing-deps, 'curl')
207+ uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
208+ with :
209+ script : |
210+ const fs = require('node:fs');
211+ const path = require('node:path');
212+ const os = require('node:os');
213+
214+ // Find and fix the .curlrc file that contains unexpanded shell variables like ${SSL_CERT_FILE:-...}
215+ // The pkgxdev curl installs .curlrc next to the curl binary
216+ try {
217+ const curlPath = await io.which('curl', false);
218+ if (curlPath) {
219+ const curlrc = path.join(path.dirname(curlPath), '.curlrc');
220+ if (fs.existsSync(curlrc)) {
221+ core.info(`Removing malformed .curlrc: ${curlrc}`);
222+ await io.rmRF(curlrc);
223+ }
224+ }
225+ } catch (error) {
226+ core.warning(`Failed to check/remove .curlrc: ${error.message}`);
227+ }
228+
204229 - name : 📊 Upload coverage to Codecov
205230 if : always() && inputs.coverage == 'codecov'
206231 uses : codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
You can’t perform that action at this time.
0 commit comments