Skip to content

Commit

Permalink
Merge pull request #873 from flavio/refactor-and-update-to-latest-rust
Browse files Browse the repository at this point in the history
refactor and update to latest rust
  • Loading branch information
flavio authored Aug 1, 2024
2 parents 07e5dc0 + d39250f commit 3def05a
Show file tree
Hide file tree
Showing 7 changed files with 861 additions and 817 deletions.
12 changes: 9 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,13 @@ async fn main() -> Result<()> {
// adapt the output. This can later be removed if
// prettytable provides methods to disable color globally
if no_color {
env::set_var("TERM", "dumb");
unsafe {
env::set_var("TERM", "dumb");
}
} else {
env::set_var("TERM", term_color_support);
unsafe {
env::set_var("TERM", term_color_support);
}
}

// setup logging
Expand Down Expand Up @@ -473,7 +477,9 @@ fn remote_server_options(matches: &ArgMatches) -> Result<Option<Sources>> {

if let Some(docker_config_json_path) = matches.get_one::<String>("docker-config-json-path") {
// docker_credential crate expects the config path in the $DOCKER_CONFIG. Keep docker-config-json-path parameter for backwards compatibility
env::set_var(DOCKER_CONFIG_ENV_VAR, docker_config_json_path);
unsafe {
env::set_var(DOCKER_CONFIG_ENV_VAR, docker_config_json_path);
}
}
if let Ok(docker_config_path_str) = env::var(DOCKER_CONFIG_ENV_VAR) {
let docker_config_path = Path::new(&docker_config_path_str).join("config.json");
Expand Down
Loading

0 comments on commit 3def05a

Please sign in to comment.