Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
stevesea opened this issue Apr 29, 2021 · 2 comments
Closed

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

stevesea opened this issue Apr 29, 2021 · 2 comments
Labels
Milestone

Comments

@stevesea
Copy link

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
@arturcic
Copy link
Member

arturcic commented May 2, 2021

Closed by #2676

@arturcic arturcic closed this as completed May 2, 2021
@arturcic arturcic added this to the 5.6.10 milestone May 2, 2021
@github-actions
Copy link

🎉 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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants