Skip to content

Windows consul command line paths #10918

Open
@per-lind

Description

@per-lind

Overview of the Issue

Consul does not understand a windows path correctly when it ends with a \ as is common for folders. For example using consul.exe agent -config-dir "C:\Program Files\Consul\consul.d\" will fail with ==> config: Open failed on C:\Program Files\Consul\consul.d". open C:\Program Files\Consul\consul.d": The filename, directory name, or volume label syntax is incorrect. notice the error message leaving out the trailing \

The same problem can be seen on other config settings also, for example on data_dir.

Reproduction Steps

Steps to reproduce this issue, eg:

  1. Try to run consul with consul.exe agent -config-dir "C:\Program Files\Consul\consul.d\" and config files placed in C:\Program Files\Consul\consul.d\

Operating system and Environment details

Windows server 2019
Consul v1.10.1
Revision db839f1

Metadata

Metadata

Assignees

No one assigned

    Labels

    help-wantedWe encourage community PRs for these issues!theme/windowsAnything related to Windowstype/bugFeature does not function as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions