"error: unknown option '-c'" when running gitlab-runner on simple job
Summary
gitlab-runner
fails on a simple job with the error in the title.
Steps to reproduce
gitlab-runner exec docker my-job
.gitlab-ci.yml
my-job:
image:
name: postman/newman
script:
- newman --version
Actual behavior
$ sudo gitlab-runner exec docker my-job
Runtime platform arch=amd64 os=linux pid=28466 revision=90fba503 version=13.1.0~beta.150.g90fba503
fatal: ambiguous argument 'HEAD~1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Running with gitlab-runner 13.1.0~beta.150.g90fba503 (90fba503)
Preparing the "docker" executor
Using Docker executor with image postman/newman ...
Pulling docker image postman/newman ...
Using docker image sha256:31402f7ebe54441181c1862b08ce30641ee6acfb540bf9035efe922105229c2b for postman/newman ...
Preparing environment
Running on runner--project-0-concurrent-0 via jean-sebastien...
Getting source from Git repository
Fetching changes...
Initialized empty Git repository in /builds/project-0/.git/
Created fresh repository.
Checking out a9f2fed9 as master...
Skipping Git submodules setup
Executing "step_script" stage of the job script
error: unknown option '-c'
ERROR: Job failed: exit code 1
FATAL: exit code 1
Expected behavior
<blah blah blah>
$ newman --version
<version>
Relevant logs and/or screenshots
job log
Add the job log
Environment description
This happens both with a local gitlab-runner
installation and in my pipeline stage on GitLab CI.
Docker version 19.03.9, build 9d988398e7
Used GitLab Runner version
$ gitlab-runner --version
Version: 13.1.0~beta.150.g90fba503
Git revision: 90fba503
Git branch: master
GO version: go1.13.8
Built: 2020-06-03T16:00:32+0000
OS/Arch: linux/amd64
Possible fixes
Edited by Jean-Sebastien Basque-Girouard