appveyor / ci

AppVeyor community support repository
https://www.appveyor.com
344 stars 64 forks source link

Incorrect `clone_depth` parsing when using macos image #3912

Open julien-jean opened 3 months ago

julien-jean commented 3 months ago

Hello! :wave:

We're having trouble with shallow cloning when using macos images. The clone_depth property do not seem to be correctly parsed.

Here's our base config (sorry for not having a reproducer):

build: false
image: macos-sonoma # same issue on macos-monterey
shallow_clone: true
clone_depth: 6
skip_tags: true
branches:
  only:
    - staging
    - prod

When the pipeline starts, we can retrieve in the job output the following error message:

git clone -q --branch=main https://myrepo.git;6 /Users/appveyor/projects/my-workspace-79ve7
/usr/local/Cellar/appveyor-build-agent/7.0.3293/bash-shell.sh: line 51: 6: command not found

Looks like the clone_depth property isn't correctly retrieved from the yaml and is parsed as a command instead. As you can see, 6 is the clone_depth value.

Also we're using appveyor from gitlab.

What can I do to fix this?