From fec4ff4eb698c410a59f2001725f7a960d979963 Mon Sep 17 00:00:00 2001 From: Aniruddha Mukherjee Date: Fri, 5 Jan 2024 01:53:12 +0530 Subject: [PATCH 1/4] Update cli.md --- docs/cli.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/cli.md b/docs/cli.md index eff8e9ab256..a8d0c09d79d 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -580,6 +580,8 @@ 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 in the traditional Unix tradition else, commands like `poetry config http-basic.custom-repo gitlab-ci-token ${GITLAB_JOB_TOKEN}` will fail if `${GITLAB_JOB_TOKEN}` starts with a hyphen (`-`). {{% /note %}} + ### Options * `--unset`: Remove the configuration element named by `setting-key`. From 4de4aa0a3a45f8ae21700d4c45dc07cab090a2ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Randy=20D=C3=B6ring?= <30527984+radoering@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:22:40 +0100 Subject: [PATCH 2/4] formatting, rephrase --- docs/cli.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/cli.md b/docs/cli.md index a8d0c09d79d..ea4043ea07d 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -580,7 +580,11 @@ 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 in the traditional Unix tradition else, commands like `poetry config http-basic.custom-repo gitlab-ci-token ${GITLAB_JOB_TOKEN}` will fail if `${GITLAB_JOB_TOKEN}` starts with a hyphen (`-`). {{% /note %}} +{{% warning %}} +Use `--` to terminate option parsing, otherwise commands like +`poetry config http-basic.custom-repo gitlab-ci-token ${GITLAB_JOB_TOKEN}` +will fail if `${GITLAB_JOB_TOKEN}` starts with a hyphen (`-`). +{{% /warning%}} ### Options From 1a2e93fe5af09cb05c8b1fe0a6a4b423f51c3a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Randy=20D=C3=B6ring?= <30527984+radoering@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:26:33 +0100 Subject: [PATCH 3/4] Update docs/cli.md --- docs/cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cli.md b/docs/cli.md index ea4043ea07d..65369ed85fe 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -582,7 +582,7 @@ See [Configuration]({{< relref "configuration" >}}) for all available settings. {{% warning %}} Use `--` to terminate option parsing, otherwise commands like -`poetry config http-basic.custom-repo gitlab-ci-token ${GITLAB_JOB_TOKEN}` +`poetry config http-basic.custom-repo gitlab-ci-token -- ${GITLAB_JOB_TOKEN}` will fail if `${GITLAB_JOB_TOKEN}` starts with a hyphen (`-`). {{% /warning%}} From 017aa1c65f9305ac093ce7b7f02d76153a3fcfd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Randy=20D=C3=B6ring?= <30527984+radoering@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:44:43 +0100 Subject: [PATCH 4/4] Update cli.md --- docs/cli.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/cli.md b/docs/cli.md index 65369ed85fe..74ec6dc5334 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -581,9 +581,11 @@ poetry config [options] [setting-key] [setting-value1] ... [setting-valueN] See [Configuration]({{< relref "configuration" >}}) for all available settings. {{% warning %}} -Use `--` to terminate option parsing, otherwise commands like -`poetry config http-basic.custom-repo gitlab-ci-token -- ${GITLAB_JOB_TOKEN}` -will fail if `${GITLAB_JOB_TOKEN}` starts with a hyphen (`-`). +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