Skip to content

Commit 0012782

Browse files
authored
fix(cli.rs): info command npm_package_version parsing beta-rc (#1587)
1 parent 0234336 commit 0012782

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changes/fix-info-npm-version.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"cli.rs": patch
3+
---
4+
5+
Fixes `tauri info` display version for the `@tauri-apps/api` package.

tooling/cli.rs/src/info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ fn npm_package_version<P: AsRef<Path>>(
178178
};
179179
if output.status.success() {
180180
let stdout = String::from_utf8_lossy(&output.stdout);
181-
let regex = regex::Regex::new("@([\\da-zA-Z\\.]+)").unwrap();
181+
let regex = regex::Regex::new("@([\\da-zA-Z\\-\\.]+)").unwrap();
182182
Ok(
183183
regex
184184
.captures_iter(&stdout)

0 commit comments

Comments
 (0)