From 24828c71afa9ca85194b3e95f4a064165d781a6f Mon Sep 17 00:00:00 2001 From: Aniruddha Mukherjee Date: Fri, 5 Jan 2024 22:20:15 +0530 Subject: [PATCH] Add a warning about config in the docs for possible failure point (#8850) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Randy Döring <30527984+radoering@users.noreply.github.com> --- docs/cli.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/cli.md b/docs/cli.md index eff8e9ab256..74ec6dc5334 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -580,6 +580,14 @@ poetry config [options] [setting-key] [setting-value1] ... [setting-valueN] `setting-key` is a configuration option name and `setting-value1` is a configuration value. See [Configuration]({{< relref "configuration" >}}) for all available settings. +{{% warning %}} +Use `--` to terminate option parsing if your values may start with a hyphen (`-`), e.g. +```bash +poetry config http-basic.custom-repo gitlab-ci-token -- ${GITLAB_JOB_TOKEN} +``` +Without `--` this command will fail if `${GITLAB_JOB_TOKEN}` starts with a hyphen. +{{% /warning%}} + ### Options * `--unset`: Remove the configuration element named by `setting-key`.