diff --git a/src/load_dotenv.rs b/src/load_dotenv.rs index 94037cc..2444a3a 100644 --- a/src/load_dotenv.rs +++ b/src/load_dotenv.rs @@ -1,5 +1,7 @@ use crate::common::*; +// Remove this on 2021-07-01. +#[allow(unused)] pub(crate) fn load_dotenv( config: &Config, settings: &Settings, @@ -17,13 +19,15 @@ pub(crate) fn load_dotenv( let path = directory.join(".env"); if path.is_file() { - if settings.dotenv_load.is_none() && config.verbosity.loud() { - if config.color.stderr().active() { - eprintln!("{:#}", Warning::DotenvLoad); - } else { - eprintln!("{}", Warning::DotenvLoad); - } - } + // Un-comment this on 2021-07-01. + // + // if settings.dotenv_load.is_none() && config.verbosity.loud() { + // if config.color.stderr().active() { + // eprintln!("{:#}", Warning::DotenvLoad); + // } else { + // eprintln!("{}", Warning::DotenvLoad); + // } + // } let iter = dotenv::from_path_iter(&path)?; let mut dotenv = BTreeMap::new(); diff --git a/src/warning.rs b/src/warning.rs index 23a0850..455bc98 100644 --- a/src/warning.rs +++ b/src/warning.rs @@ -2,6 +2,8 @@ use crate::common::*; #[derive(Debug, PartialEq)] pub(crate) enum Warning { + // Remove this on 2021-07-01. + #[allow(dead_code)] DotenvLoad, } diff --git a/tests/dotenv.rs b/tests/dotenv.rs index 145a2de..5ca41ca 100644 --- a/tests/dotenv.rs +++ b/tests/dotenv.rs @@ -66,25 +66,28 @@ test! { dotenv_load: false, } -test! { - name: warning, - justfile: r#" - foo: - echo $DOTENV_KEY - "#, - stdout: "dotenv-value\n", - stderr: " - warning: A `.env` file was found and loaded, but this behavior will change in the future. - To silence this warning and continue loading `.env` files, add: +// Un-comment this on 2021-07-01. +// +// test! { +// name: warning, +// justfile: r#" +// foo: +// echo $DOTENV_KEY +// "#, +// stdout: "dotenv-value\n", +// stderr: " +// warning: A `.env` file was found and loaded, but this behavior will +// change in the future. To silence this warning and continue loading `.env` +// files, add: - set dotenv-load := true +// set dotenv-load := true - To silence this warning and stop loading `.env` files, add: +// To silence this warning and stop loading `.env` files, add: - set dotenv-load := false +// set dotenv-load := false - See https://github.com/casey/just/issues/469 for more details. - echo $DOTENV_KEY - ", - dotenv_load: false, -} +// See https://github.com/casey/just/issues/469 for more details. +// echo $DOTENV_KEY +// ", +// dotenv_load: false, +// }