Skip to content

Commit 3060a76

Browse files
committed
fix: add install commands for pypi and pub sources
1 parent 7ac21a6 commit 3060a76

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "latest"
3-
version = "0.2.3"
3+
version = "0.2.4"
44
edition = "2024"
55
description = "Find the latest version of any command, package, or library"
66
license = "MIT"

src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,13 +322,14 @@ fn get_install_commands(package: &str, available: &[VersionInfo]) -> Vec<String>
322322
Some(match v.source.as_str() {
323323
"brew" => format!("brew install {package}"),
324324
"npm" => format!("npm install {}{}", if context.1 { "" } else { "-g " }, package),
325-
"pip" => {
325+
"pip" | "pypi" => {
326326
format!("{} {}", if context.0 { "uv add" } else { "pip install" }, package)
327327
}
328328
"cargo" => {
329329
format!("cargo {} {}", if context.2 { "add" } else { "install" }, package)
330330
}
331331
"go" => format!("go {} {}", if context.3 { "get" } else { "install" }, package),
332+
"pub" => format!("dart pub add {package}"),
332333
_ => return None,
333334
})
334335
})

0 commit comments

Comments
 (0)