-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
A: pipelinesRelated to the pipelines featureRelated to the pipelines featurep2-mediumMedium priority, should be done, but less importantMedium priority, should be done, but less important
Description
Bug Report
Description
If the stage being defined creates a dir and files in this dir are stage outputs, stage add will fail (because it can't write the corresponding .gitignore file).
Reproduce
$ dvc stage add -n hidir -o dir/hi 'mkdir dir && echo hi > dir/hi'
ERROR: unexpected error - [Errno 2] No such file or directory: '/.../dir/.gitignore'Expected
I guess the full path to the .gitignore in question should be created if needed. Or maybe create it at repro? Not sure how, but I would expect the stage definition not to fail for this.
Environment information
Output of dvc doctor:
$ dvc doctor
DVC version: 2.0.17 (pip)
---------------------------------
Platform: Python 3.6.9 on Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic
Supports: gdrive, hdfs, http, https, s3, ssh, oss
Cache types: <https://error.dvc.org/no-dvc-cache>
Caches: local
Remotes: None
Workspace directory: ext4 on /dev/sdb
Repo: dvc, gitdberenbaum and karajan1001
Metadata
Metadata
Assignees
Labels
A: pipelinesRelated to the pipelines featureRelated to the pipelines featurep2-mediumMedium priority, should be done, but less importantMedium priority, should be done, but less important