Skip to content

Fix custom build dir with *NIX path in Windows

What does this MR do?

Fixes the custom build path defined in Windows with *NIX path separator. For example, convert E:\\GitLab-Cloud-Runner/builds to E:\\GitLab-Cloud-Runner\\builds. So this fix converts any *NIX separator to the system separator.

See #4858 (closed) .

Why was this MR needed?

The validation of the GIT_CLONE_PATH checks if this path is within the custom build path defined. Since its a string validation (Go's filepath.HasPrefix), when the custom build dir was defined with some *NIX separator, the validation fails.

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased

What are the relevant issue numbers?

Closes #4858 (closed)

Edited by Steve Xuereb

Merge request reports