Skip to content

Commit

Permalink
Add: env REDIS_URL to set redis-url
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtsfrei committed Apr 8, 2024
1 parent 5c18918 commit 68eeeb1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rust/openvasd/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ impl TypedValueParser for ScannerType {
Ok(match value.to_str().unwrap_or_default() {
"ospd" => ScannerType::OSPD,
"openvas" => ScannerType::Openvas,
_ => {
x => {
let mut cmd = cmd.clone();
let err = cmd.error(
clap::error::ErrorKind::InvalidValue,
"`{}` is not a scanner type.",
format!("`{x}` is not a scanner type."),
);
return Err(err);
}
Expand Down Expand Up @@ -387,6 +387,7 @@ impl Config {
.arg(
clap::Arg::new("redis-url")
.long("redis-url")
.env("REDIS_URL")
//.value_parser(clap::builder::PathBufValueParser::new())
.action(ArgAction::Set)
.help("Redis url. Either unix:// or redis://"))
Expand Down

0 comments on commit 68eeeb1

Please sign in to comment.