@@ -15,7 +15,7 @@ use console::Term;
1515use ansi_term;
1616
1717use assets::BAT_THEME_DEFAULT;
18−use config::get_args_from_config_file;
18+use config::{get_args_from_config_file, get_args_from_env_var};
1919use errors::*;
2020use inputfile::InputFile;
2121use line_range::LineRange;
@@ -104,8 +104,9 @@ impl App {
104104 let mut cli_args = wild::args_os();
105105
106106 // Read arguments from bats config file
107− let mut args =
108− get_args_from_config_file().chain_err(|| "Could not parse configuration file")?;
107+ let mut args = get_args_from_env_var()
108+ .unwrap_or_else(|| get_args_from_config_file())
109+ .chain_err(|| "Could not parse configuration file")?;
109110
110111 // Put the zero-th CLI argument (program name) first
111112 args.insert(0, cli_args.next().unwrap());