Skip to content

Commit

Permalink
Issue warning message for 'wash reg push' to localhost without --inse…
Browse files Browse the repository at this point in the history
…cure (#165)

Signed-off-by: Whealy, Chris (GfK External) <[email protected]>
Signed-off-by: Chris Whealy <[email protected]>

Co-authored-by: Whealy, Chris (GfK External) <[email protected]>
  • Loading branch information
ChrisWhealy and Whealy, Chris (GfK External) authored Sep 9, 2021
1 parent 972fa70 commit 4058100
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/reg.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extern crate oci_distribution;
use crate::util::{format_output, Output, OutputKind};
use log::{debug, info};
use log::{debug, info, warn};
use oci_distribution::client::*;
use oci_distribution::secrets::RegistryAuth;
use oci_distribution::Reference;
Expand Down Expand Up @@ -304,6 +304,10 @@ fn validate_provider_archive(
}

pub(crate) async fn handle_push(cmd: PushCommand) -> Result<String, Box<dyn ::std::error::Error>> {
if cmd.url.starts_with("localhost:") && !cmd.opts.insecure {
warn!(" Unless an SSL certificate has been installed, pushing to localhost without the --insecure option will fail")
}

let spinner = match cmd.output.kind {
OutputKind::Text => Some(Spinner::new(
&Spinners::Dots12,
Expand Down

0 comments on commit 4058100

Please sign in to comment.