1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-26 18:20:59 +00:00
forgejo-runner/act/runner/testdata/uses-composite-check-for-input-collision/action-with-pre-and-post/pre.js
ChristopherHX cb99c53dc1
fix: composite action input pollution (#2348)
* fix: composite action input pollution

* fix run steps

* fix missing defaults in post after env cleanup

* fix test to make more sense

* Add tests and simplify change

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 54245641d28fc496152684e151043ce0c7389086)

Conflicts:
	act/runner/step_test.go
    the modified test does not exist in the Forgejo runner
2025-08-10 14:45:30 +02:00

12 lines
No EOL
244 B
JavaScript

console.log('pre');
var cache = process.env['INPUT_CACHE']
try {
var cache = JSON.parse(cache)
} catch {
}
if(typeof cache !== 'boolean') {
console.log("Input Polluted boolean true/false expected, got " + cache)
process.exit(1);
}