Skip to content

Commit

Permalink
fix: agent version error for auto install
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhazhazhu committed Mar 8, 2024
1 parent 1a243a1 commit aeaaad7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/detect/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ pub fn detect(options: DetectOptions) -> Option<Agent> {

let mut args: Vec<String> = vec!["i".into(), "-g".into()];
if let Some(v) = version.clone() {
let agent = format!("{}@{}", agent.as_str(), v);
let agent = agent.as_str().split("@").collect::<Vec<&str>>()[0];
let agent = format!("{agent}@{v}");
args.push(agent);
} else {
let agent = format!("{}", agent.as_str());
Expand Down

0 comments on commit aeaaad7

Please sign in to comment.