Update src/config/container.rs

use `strip_prefix`
This commit is contained in:
epi
2022-01-13 07:16:29 -06:00
committed by GitHub
parent 6158d36279
commit b040113115

View File

@@ -581,7 +581,7 @@ impl Configuration {
}
if let Some(arg) = args.value_of("data") {
if arg.starts_with("@") {
if let Some(stripped) = arg.strip_prefix('@') {
config.data =
std::fs::read(&arg[1..]).unwrap_or_else(|e| report_and_exit(&e.to_string()));
} else {