Skip to content

Commit

Permalink
Update kraken-build/src/kraken/std/cargo/manifest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasRosenstein authored Feb 27, 2024
1 parent cbaec4e commit 166d58a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kraken-build/src/kraken/std/cargo/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def read(cls, project_dir: Path, locked: bool | None = None) -> CargoMetadata:
str(project_dir / "Cargo.toml"),
]
if locked is None:
for parent in (project_dir / "Cargo.toml").absolute().parents:
project_dir = project_dir.absolute()
for parent in [project_dir, *project_dir.parents]:
if (parent / "Cargo.lock").exists():
cmd.append("--locked")
break
Expand Down

0 comments on commit 166d58a

Please sign in to comment.