Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Lohann committed Aug 27, 2023
1 parent 9c2e2b3 commit 2739324
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/detect_host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ pub enum EndpointError {
/// # Fails when
/// * Cannot find docker config directory
/// * `DOCKER_CONTEXT` is defined and is invalid
/// * `config.js` file exists and fails to read or parse it
/// * `config.js` have the `currentContext` property defined, but fails to find the context endpoint
/// * `config.json` file exists and fails to read or parse it
/// * `config.json` have the `currentContext` property defined, but fails to find the context endpoint
pub fn find_docker_host() -> Result<String, EndpointError> {
// If defined, Load the endpoint from the `DOCKER_CONTEXT` environment variable
if let Some(context) = env_vars::non_empty_var(DOCKER_CONTEXT) {
Expand Down Expand Up @@ -111,11 +111,11 @@ pub fn docker_config_dir() -> Result<PathBuf, EndpointError> {
/// Attempts to load the endpoint from the `.docker/config.json` file
///
/// # Returns
/// * Ok(Some(host)) - if the config.js exists and contains currentContext field
/// * Ok(None) - if the config.js exists and not contain currentContext field
/// * Ok(Some(host)) - if the config.json exists and contains currentContext field
/// * Ok(None) - if the config.json exists and not contain currentContext field
///
/// # Fails when
/// * config.js doesn't exists
/// * config.json doesn't exists
/// * cannot read or parse the config.js file
/// * the currentContext is defined, but fails to load the context endpoint
pub fn host_from_config_file(config_file: PathBuf) -> Result<Option<String>, EndpointError> {
Expand Down

0 comments on commit 2739324

Please sign in to comment.