Clarify what default work dir is when multiple compose files

Signed-off-by: Daniel Lublin <daniel@lublin.se>
This commit is contained in:
Daniel Lublin 2022-04-28 17:51:35 +02:00
parent 028cb4dd89
commit d89c143c39
3 changed files with 5 additions and 5 deletions

View File

@ -129,8 +129,8 @@ func (o *projectOptions) addProjectFlags(f *pflag.FlagSet) {
f.StringVarP(&o.ProjectName, "project-name", "p", "", "Project name") f.StringVarP(&o.ProjectName, "project-name", "p", "", "Project name")
f.StringArrayVarP(&o.ConfigPaths, "file", "f", []string{}, "Compose configuration files") f.StringArrayVarP(&o.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
f.StringVar(&o.EnvFile, "env-file", "", "Specify an alternate environment file.") f.StringVar(&o.EnvFile, "env-file", "", "Specify an alternate environment file.")
f.StringVar(&o.ProjectDir, "project-directory", "", "Specify an alternate working directory\n(default: the path of the Compose file)") f.StringVar(&o.ProjectDir, "project-directory", "", "Specify an alternate working directory\n(default: the path of the, first specified, Compose file)")
f.StringVar(&o.WorkDir, "workdir", "", "DEPRECATED! USE --project-directory INSTEAD.\nSpecify an alternate working directory\n(default: the path of the Compose file)") f.StringVar(&o.WorkDir, "workdir", "", "DEPRECATED! USE --project-directory INSTEAD.\nSpecify an alternate working directory\n(default: the path of the, first specified, Compose file)")
f.BoolVar(&o.Compatibility, "compatibility", false, "Run compose in backward compatibility mode") f.BoolVar(&o.Compatibility, "compatibility", false, "Run compose in backward compatibility mode")
_ = f.MarkHidden("workdir") _ = f.MarkHidden("workdir")
} }

View File

@ -44,7 +44,7 @@ Docker Compose
| `-f`, `--file` | `stringArray` | | Compose configuration files | | `-f`, `--file` | `stringArray` | | Compose configuration files |
| `--profile` | `stringArray` | | Specify a profile to enable | | `--profile` | `stringArray` | | Specify a profile to enable |
| `--project-directory` | `string` | | Specify an alternate working directory | `--project-directory` | `string` | | Specify an alternate working directory
(default: the path of the Compose file) | (default: the path of the, first specified, Compose file) |
| `-p`, `--project-name` | `string` | | Project name | | `-p`, `--project-name` | `string` | | Project name |

View File

@ -222,7 +222,7 @@ options:
value_type: string value_type: string
description: |- description: |-
Specify an alternate working directory Specify an alternate working directory
(default: the path of the Compose file) (default: the path of the, first specified, Compose file)
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -265,7 +265,7 @@ options:
description: |- description: |-
DEPRECATED! USE --project-directory INSTEAD. DEPRECATED! USE --project-directory INSTEAD.
Specify an alternate working directory Specify an alternate working directory
(default: the path of the Compose file) (default: the path of the, first specified, Compose file)
deprecated: false deprecated: false
hidden: true hidden: true
experimental: false experimental: false