Skip to content

Fix powershell #requires use

Arran Walker requested to merge 26623-powershell-error-on-windows-tests into master

What does this MR do?

Windows Powershell #requires only works when written as part of a script file. Some executors do not support passing by a script file.

Why was this MR needed?

Causes misleading error/warning messages in Windows job output.

What's the best way to test this MR?

Running go test -v -run TestDockerCommandSuccessRun gitlab.com/gitlab-org/gitlab-runner/executors/docker contains errors:

[0;mAn error occurred while creating the pipeline.
    + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordE
   xception
    + FullyQualifiedErrorId : RuntimeException

Running the same command with this patch should fix.

What are the relevant issue numbers?

Closes #26623 (closed)

Edited by Arran Walker

Merge request reports