Update lockfile after project pull

This commit is contained in:
Matthew Honnibal 2020-08-24 03:27:09 +02:00
parent 588c28fe45
commit 64df37643f

View File

@ -4,6 +4,7 @@ from .remote_storage import RemoteStorage
from .remote_storage import get_command_hash from .remote_storage import get_command_hash
from .._util import project_cli, Arg from .._util import project_cli, Arg
from .._util import load_project_config from .._util import load_project_config
from .run import update_lockfile
@project_cli.command("pull") @project_cli.command("pull")
@ -36,3 +37,6 @@ def project_pull(project_dir: Path, remote: str, *, verbose: bool = False):
for output_path in cmd.get("outputs", []): for output_path in cmd.get("outputs", []):
url = storage.pull(output_path, command_hash=cmd_hash) url = storage.pull(output_path, command_hash=cmd_hash)
yield url, output_path yield url, output_path
if cmd.get("outptus") and all(loc.exists() for loc in cmd["outputs"]):
update_lockfile(project_dir, cmd)