Skip to content

Commit a263d62

Browse files
Merge pull request #34026 from MaterializeInc/push-vzpyvwxvpqrs
fix getting mz versions from outside of the materialize repo
2 parents e7cf15e + 1aa5ed9 commit a263d62

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

misc/python/materialize/mz_version.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
except ImportError:
2121
from semver import VersionInfo as Version # type: ignore
2222

23+
from materialize import MZ_ROOT
24+
2325
T = TypeVar("T", bound="TypedVersionBase")
2426

2527

@@ -107,7 +109,8 @@ def parse_cargo(cls) -> MzVersion:
107109
"""Uses the cargo mz-environmentd package info to get the version of current source code state"""
108110
metadata = json.loads(
109111
subprocess.check_output(
110-
["cargo", "metadata", "--no-deps", "--format-version=1"]
112+
["cargo", "metadata", "--no-deps", "--format-version=1"],
113+
cwd=MZ_ROOT,
111114
)
112115
)
113116
for package in metadata["packages"]:

0 commit comments

Comments
 (0)