We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13f7759 commit f94b1f4Copy full SHA for f94b1f4
1 file changed
scripts/sync-tauri-version.mjs
@@ -72,7 +72,7 @@ if (currentCargoVersion !== version) {
72
const cargoLockPath = join(root, 'src-tauri/Cargo.lock')
73
const cargoLockSrc = readFileSync(cargoLockPath, 'utf-8')
74
const cargoLockPackageRe =
75
- /(^\[\[package\]\]\n(?:(?!^\[\[package\]\]).)*?^name\s*=\s*"switchhosts"\s*$\n(?:(?!^\[\[package\]\]).)*?^version\s*=\s*")([^"]*)(")/ms
+ /(^\[\[package\]\]\r?\n(?:(?!^\[\[package\]\]).)*?^name[ \t]*=[ \t]*"switchhosts"[ \t]*\r?\n(?:(?!^\[\[package\]\]).)*?^version[ \t]*=[ \t]*")([^"]*)(")/ms
76
const cargoLockMatch = cargoLockSrc.match(cargoLockPackageRe)
77
if (!cargoLockMatch) {
78
throw new Error(`[sync-version] cannot find the switchhosts package entry in ${cargoLockPath}`)
0 commit comments