output: set remove to recursive=false (#9574)

* output: set remove to recursive=false

* try to make test pass on windows

* Update dvc/output.py

---------

Co-authored-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Dave Berenbaum
2023-06-21 01:33:04 +03:00
committed by GitHub
co-authored by Ruslan Kuprieiev
parent 621fe07a3b
commit f28d5ee9e0
2 changed files with 13 additions and 1 deletions
+9
View File
@@ -1273,3 +1273,12 @@ def test_repro_missing_lock_info(tmp_dir, dvc, copy_script):
stages = dvc.reproduce(stage.addressing)
assert len(stages) == 1
def test_repro_rm_recursive(tmp_dir, dvc):
# check that dir output recursively removes files in the dir
tmp_dir.gen({"dir": {"foo": "foo"}})
dvc.stage.add(name="dir", cmd="mkdir dir", outs=["dir"])
dvc.reproduce()
assert (tmp_dir / "dir").exists()
assert not (tmp_dir / "dir" / "foo").exists()