Skip to content

Commit

Permalink
refactor(modules): ensure that Docker_Context domain socket path star…
Browse files Browse the repository at this point in the history
…ts with `unix://`
  • Loading branch information
ananta committed Dec 5, 2023
1 parent f9a75e0 commit 2ad4f87
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/modules/docker_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
_ => None,
})
.map(|variable| match variable {
"context" => Some(Ok(if ctx.contains("unix://") {
""
} else {
ctx.as_str()
})),
"context" if !ctx.starts_with("unix://") => Some(Ok(ctx.as_str())),
_ => None,
})
.parse(None, Some(context))
Expand Down

0 comments on commit 2ad4f87

Please sign in to comment.