Skip to content

Windows Runner list command outputs incorrect directory

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

When running .\gitlab-runner.exe list, the ConfigFile displayed is incorrect.

Steps to reproduce

  • Set up GitLab Runner on Windows in C:\gitlab-runner
  • cd C:\otherdir
  • C:\gitlab-runner\gitlab-runner.exe list

Example Project

What is the current bug behavior?

Incorrect display of where the config file for the currently running runner resides. It outputs the current working directory instead.

What is the expected correct behavior?

The ConfigFile should display where the config actually exists.

Relevant logs and/or screenshots

C:\Users\Administrator>C:\GitLab-Runner\gitlab-runner.exe list
Runtime platform                                    arch=amd64 os=windows pid=6312 revision=535ced5f version=16.11.1
Created missing unique system ID                    system_id=s_e46bbe51938a
Listing configured runners                          ConfigFile=C:\Users\Administrator\config.toml

C:\Users\Administrator>cd C:\randomdir

C:\randomdir>C:\GitLab-Runner\gitlab-runner.exe list
Runtime platform                                    arch=amd64 os=windows pid=6460 revision=535ced5f version=16.11.1
Listing configured runners                          ConfigFile=C:\randomdir\config.toml

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by 🤖 GitLab Bot 🤖