Closed hverlin closed 11 months ago
Minimal .gitlab-ci.yml illustrating the issue
--- test-job: before_script: echo "Before test" script: echo "Test something" after_script: echo "After something"
Expected behavior example job logs
Host information Ubuntu gitlab-ci-local 4.1.33
Containerd binary Docker
Additional context The spec indicates this it should be an array. However, the implementation seems to support plain strings: https://docs.gitlab.com/ee/ci/yaml/#before_script
The example for scripts shows a plain string being used: https://docs.gitlab.com/ee/ci/yaml/#script
Currently, gitlab-ci-local crashes with the following error:
gitlab-ci-local
TypeError: job.beforeScripts.forEach is not a function 74 | for (const job of jobs) { 75 | if (job.trigger) continue; > 76 | job.beforeScripts.forEach((s: any) => assert(typeof s === "string", chalk`{blue ${job.name}} before_script contains non string value`)); | ^ 77 | job.afterScripts.forEach((s: any) => assert(typeof s === "string", chalk`{blue ${job.name}} after_script contains non string value`)); 78 | job.scripts.forEach((s: any) => assert(typeof s === "string", chalk`{blue ${job.name}} script contains non string value`)); 79 | }
@firecow Would it be possible to release a new version? Or otherwise, do you know when a new one will be available?
I'll make a release during the weekend @hverlin 👍
Thanks!
Minimal .gitlab-ci.yml illustrating the issue
Expected behavior example job logs
Host information Ubuntu gitlab-ci-local 4.1.33
Containerd binary Docker
Additional context The spec indicates this it should be an array. However, the implementation seems to support plain strings: https://docs.gitlab.com/ee/ci/yaml/#before_script
The example for scripts shows a plain string being used: https://docs.gitlab.com/ee/ci/yaml/#script
Currently,
gitlab-ci-local
crashes with the following error: