Skip to content

[Bug] '.' not accepted as PATH argument (in 5.6.9) #2675

Closed

Description

@stevesea

Describe the bug
My gitlab pipelines started failing after the 5.6.9 release -- failing with

The system cannot open the device or file specified. : 'Global\.'

My gitlab pipeline job looks like:

version:
  stage: version
  cache: {}
  image:
    name: gittools/gitversion:latest
    entrypoint: [""]
  rules:
    - if: $CI_MERGE_REQUEST_IID
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
  artifacts:
    name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
    paths:
      - gitversion.properties
  script:
    - /tools/dotnet-gitversion . /output buildserver
    - cat gitversion.properties

later jobs in the pipeline depend on the version job and import the env vars from gitversion.properties.

Expected Behavior

With 5.6.8 and earlier, using '.' as the path works:

❯ docker run --rm -v "$(pwd):/repo" -it --entrypoint /bin/bash gittools/gitversion:5.6.8       
root@7e5bc4da4ee2:/tools# cd /repo
root@7e5bc4da4ee2:/repo# /tools/dotnet-gitversion . /output json 
{
  "Major": 3,
  "Minor": 3,
  "Patch": 1,

Actual Behavior

With 5.6.9, '.' as the path fails:

❯ docker run --rm -v "$(pwd):/repo" -it --entrypoint /bin/bash gittools/gitversion:5.6.9           
root@b4e01d80db52:/tools# cd /repo
root@b4e01d80db52:/repo# /tools/dotnet-gitversion . /output json  
The system cannot open the device or file specified. : 'Global\.'

# however, I can use $(pwd) instead and it's happy
root@b4e01d80db52:/repo# /tools/dotnet-gitversion $(pwd) /output json  
{
  "Major": 3,
  "Minor": 3,
  "Patch": 1,

Possible Fix

to work-around it on gitlab, I'm probably going to replace my pipeline job definition with

    - /tools/dotnet-gitversion $(pwd) /output buildserver

or

    - /tools/dotnet-gitversion ${CI_PROJECT _PATH} /output buildserver

Activity

  1. arturcic commented on May 2, 2021

    @arturcic
    Member

    Closed by #2676

  2. added this to the 5.6.10 milestone on May 2, 2021
  3. github-actions commented on May 27, 2021

    @github-actions

    🎉 This issue has been resolved in version 5.6.10 🎉
    The release is available on:

    Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions