Skip to content

Commit 4eab397

Browse files
committed
Fix local package usage.
1 parent 44ddc24 commit 4eab397

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/common/project.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,9 @@ void Project::load(const yaml &root)
870870
auto p = d["local"].template as<String>();
871871
Package pkg;
872872
pkg.ppath = p;
873+
if (!d["version"].IsDefined())
874+
throw std::runtime_error("dependency: local is present, but version is not: " + p);
875+
pkg.version = d["version"].template as<String>();
873876
if (rd.known_local_packages.find(pkg) != rd.known_local_packages.end())
874877
local_ok = true;
875878
if (local_ok)

0 commit comments

Comments
 (0)