Fix powershell stdin data race

What does this MR do?

Move encoder from global scope to method

Why was this MR needed?

Data race : https://gitlab.com/gitlab-org/gitlab-runner/-/jobs/9656883916/viewer#L4252

What's the best way to test this MR?

What are the relevant issue numbers?

Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading