mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
tests: remove unnecessary variable interpolation
dvc.run does not expand variables. It is only done when it's actually read from dvc.yaml file. So during dvc run, the shell will try to expand the variable, which does not exist. I don't think that the intention was to use shell variables. But I don't think we should ever use them, as they will fail on some shells (eg: fish) and keep the scripts as simple as possible.
This commit is contained in:
committed by
David de la Iglesia Castro
parent
ce0f6c187e
commit
1be82fa56d
@@ -8,7 +8,7 @@ from dvc.scm import resolve_rev
|
||||
|
||||
def setup_stage(tmp_dir, dvc, scm):
|
||||
tmp_dir.gen("params.yaml", "foo: 1")
|
||||
dvc.run(name="echo-foo", outs=["bar"], cmd="echo ${foo} > bar")
|
||||
dvc.run(name="echo-foo", outs=["bar"], cmd="echo foo > bar")
|
||||
scm.add(["dvc.yaml", "dvc.lock", ".gitignore", "params.yaml"])
|
||||
scm.commit("init")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user