Skip to content

Absolute path for config file doesn't work #863

@ikattur-ota

Description

@ikattur-ota

Describe the bug

Absolute path for config file does not work. Relative paths work fine.

How can we reproduce it?

Failure scenario:

AzureAD+User@XXX-PDEV-000123 MINGW64 /tmp/New/Network
$ ls -l /tmp/New/docs/terraform-docs/.terraform-docs.yml
-rw-r--r-- 1 AzureAD+User 4096 1883 Jul 11 16:57 /tmp/New/docs/terraform-docs/.terraform-docs.yml

AzureAD+User@XXX-PDEV-000123 MINGW64 /tmp/New/Network
$ terraform-docs -c /tmp/New/docs/terraform-docs/.terraform-docs.yml .
Error: config file /tmp/New/docs/terraform-docs/.terraform-docs.yml not found

Success scenarios:

AzureAD+User@XXX-PDEV-000123 MINGW64 /tmp/New/Network
$ terraform-docs -c ../docs/terraform-docs/.terraform-docs.yml .
README.md updated successfully

AzureAD+User@XXX-PDEV-000123 MINGW64 /tmp/New/Network
$ cp /tmp/New/docs/terraform-docs/.terraform-docs.yml .

AzureAD+User@XXX-PDEV-000123 MINGW64 /tmp/New/Network
$ terraform-docs .
README.md updated successfully

Environment information

$ terraform-docs --version
terraform-docs version v0.20.0 cf462c5 windows/amd64


$ bash --version
GNU bash, version 5.2.37(1)-release (x86_64-pc-msys)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Also, I'm using Git Bash on Windows 11. VS Code Version: 1.101.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions