Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've always been confused by how the CI script is evaluated in these yaml based systems. It is written as an array of lines, but seems to be running in a single context (local variables, etc.), but also there is some special handling for exit code of each line. I'm not sure how exec would work.


>It is written as an array of lines, but seems to be running in a single context (local variables, etc.) [...]

It's documented for GH at https://docs.github.com/en/actions/writing-workflows/workflo...

>>The shell command that is run internally executes a temporary file that contains the commands specified in the run keyword.

... and also mentioned in the article submitted here:

>>If the command doesn't already take a single file as input, you need to pass it the special {0} argument, which GitHub replaces with the temporary file that it generates the template-expanded run block into.

---

>[...] but also there is some special handling for exit code of each line.

As you can see in the defaults in the first link, the Linux default is to run bash with `-e`


I mean technically GitHub could intercept the exec syscall, but given that the shell allows executing other programs that call fork and exec, you can't really block it (and why would you, really).

Highly likely that exec would work.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: