Add: give ‘does not exist ERROR’ if a file with a leading question mark is given
See original GitHub issueBug Report
Description
see Issue name.
Reproduce
I have a dvc folder data
with has two files test?test.txt
and ?test.txt
:
.
└── data
├── test?test.txt
└── ?test.txt
1 directory, 3 files
If I try to add ?test.txt
I get this error:
$ dvc add data/\?test.txt
Adding...
ERROR: output 'data?test.txt' does not exist
Apparently DVC things I want to add data?test.txt
and yes this file does not exist, but this is not what I wanna add. The other file data/test?test.txt
I can add without any problems. I thing there is a problem with the leading question mark. I also tested this witch a leading ‘#’, same problem.
My question is: Is this on purpose? I noticed the behavior in DVC version 2.18.1 or so. Befor I hat no problem with leading question marks.
Expected
Just add the file.
Environment information
DVC version: 2.20.0 (deb)
---------------------------------
Platform: Python 3.8.3 on Linux-5.4.0-125-generic-x86_64-with-glibc2.14
Supports:
http (aiohttp = 3.8.1, aiohttp-retry = 2.8.3),
https (aiohttp = 3.8.1, aiohttp-retry = 2.8.3),
ssh (sshfs = 2022.6.0)
Cache types: hardlink, symlink
Cache directory: ext4 on /dev/sda2
Caches: local
Remotes: None
Workspace directory: ext4 on /dev/sda2
Repo: dvc, git
Additional Information (if any):
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
PyCharm tells me "Cannot start process, the working directory ...
When I run my python main file, PyCharm keeps telling me Cannot start process, the working directory /home/myname/PyCharmProjects/MyProjectName/mypackage does ...
Read more >How do I make rm not give an error if a file doesn't exist?
I use set -e in all my bash scripts so that the script exits after any command gives an error. I often want...
Read more >How the Question Mark (?) Operator Works in JavaScript
The conditional or question mark operator, represented by a ?, is one of the most powerful features in JavaScript. The ? operator is...
Read more >Errors using special characters in Access databases - Office
Lists the special characters to avoid using when you work with the database object names or the field names in all versions of...
Read more >Optional chaining (?.) - JavaScript - MDN Web Docs - Mozilla
When used with function calls, it returns undefined if the given function does not exist. This results in shorter and simpler expressions ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I tested it with DVC version
2.18.0
; all cool. DVC version2.18.1
i get the same error.This was introduced in https://github.com/iterative/dvc-objects/commit/23e87bb76bca81fd88053f8fadf628d975f94a12 cc @efiop