Skip to content

Commit 19c5033

Browse files
authored
Fix: improve error message when a lib needs to be upgraded (#1560)
* Fix: improve error message when a lib needs to be upgraded * Lowercase the lib * PR feedback * Ensure we upgrade the package version in the pip command
1 parent acb18ad commit 19c5033

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sqlmesh/core/state_sync/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def raise_error(lib: str, local: str | int, remote: str | int, ahead: bool = Fal
162162
f"{lib} (local) is using version '{local}' which is ahead of '{remote}' (remote). Please run a migration ('sqlmesh migrate' command)."
163163
)
164164
raise SQLMeshError(
165-
f"{lib} (local) is using version '{local}' which is behind '{remote}' (remote). Please upgrade {lib}."
165+
f"{lib} (local) is using version '{local}' which is behind '{remote}' (remote). Please upgrade {lib} ('pip install --upgrade \"{lib.lower()}=={remote}\"' command)."
166166
)
167167

168168
if SCHEMA_VERSION < versions.schema_version:

0 commit comments

Comments
 (0)