I’ve just run into this problem and was about to post a bug report - but thankfully discourse pointed me to previous reports - well done! That saves time and bandwidth.
But, back to the problem and the suggested solution
- is this scheduled to be fixed? I’ve never written any golang but it looks as if it requires a bit more than some copy/paste otherwise I’d try it myself. But I’ve already lost a lot of time today on this today
There is another associated bug here - afaict the yaml is parsed differently. I think I stumbled across that yesterday so yaml that works with drone exec may not work with the runner. The idea behing drone exec is great , but in its currently implementation it is not so useful.
I did notice, however, as a workaround it is possible to add global vars to the env var file that drone exec loads. That seems to work, but again will not work the same way as the runner as the runner requires environment:
to be declared for each pipeline, not the entire file. Which again is a bit of a bummer.