summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Iofel <github@iofel.me>2021-01-11 11:38:58 -0500
committerGitHub <noreply@github.com>2021-01-11 17:38:58 +0100
commit0a9db856de13ab51000cff1c312a41c3d51a6de1 (patch)
treeb8c71ecdc9dac9ac637b565381fdfda9b898e046
parent42c4590da93c44d9f2145a4123f8644259acb661 (diff)
fix(docker_context): enable if either yml or yaml is found (#2053)
* fix(docker_context): enable if either yml or yaml is found * Update docs
-rw-r--r--docs/config/README.md14
-rw-r--r--src/modules/docker_context.rs2
2 files changed, 8 insertions, 8 deletions
diff --git a/docs/config/README.md b/docs/config/README.md
index 47507ea83..8d3bd1672 100644
--- a/docs/config/README.md
+++ b/docs/config/README.md
@@ -710,13 +710,13 @@ The `docker_context` module shows the currently active
### Options
-| Option | Default | Description |
-| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------- |
-| `format` | `"via [$symbol$context]($style) "` | The format for the module. |
-| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. |
-| `style` | `"blue bold"` | The style for the module. |
-| `only_with_files` | `false` | Only show when there's a `docker-compose.yml` or `Dockerfile` in the current directory. |
-| `disabled` | `true` | Disables the `docker_context` module. |
+| Option | Default | Description |
+| ----------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- |
+| `format` | `"via [$symbol$context]($style) "` | The format for the module. |
+| `symbol` | `"🐳 "` | The symbol used before displaying the Docker context. |
+| `style` | `"blue bold"` | The style for the module. |
+| `only_with_files` | `false` | Only show when there's a `docker-compose.yml`, `docker-compose.yaml`, or `Dockerfile` in the current directory. |
+| `disabled` | `true` | Disables the `docker_context` module. |
### Variables
diff --git a/src/modules/docker_context.rs b/src/modules/docker_context.rs
index ae56f19f4..e88c657df 100644
--- a/src/modules/docker_context.rs
+++ b/src/modules/docker_context.rs
@@ -20,7 +20,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
if config.only_with_files
&& !context
.try_begin_scan()?
- .set_files(&["docker-compose.yml", "Dockerfile"])
+ .set_files(&["docker-compose.yml", "docker-compose.yaml", "Dockerfile"])
.is_match()
{
return None;