From 1be82fa56dcb8c726a84bf5944c159cb0bab9511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Wed, 12 Apr 2023 08:10:03 +0545 Subject: [PATCH] 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. --- tests/func/experiments/test_save.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/func/experiments/test_save.py b/tests/func/experiments/test_save.py index e06ca43b6..976c30c3d 100644 --- a/tests/func/experiments/test_save.py +++ b/tests/func/experiments/test_save.py @@ -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")