-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove: support file as a target #5288
Comments
I was able to make this work with the following change to @@ -382,8 +382,12 @@ def parse_target(
)
)
if not name:
- ret = (target, None)
- return ret if is_valid_filename(target) else ret[::-1]
+ if is_valid_filename(target):
+ return target, None
+ elif os.path.isfile(target) and os.path.isfile(target + DVC_FILE_SUFFIX):
+ return target + DVC_FILE_SUFFIX, None
+ else:
+ return None, target However it breaks the tests BTW, should |
It can just be equivalent to |
Note that the last time I tackle this the conclusion was that |
Thanks for remembering that @daavoo. I would echo that it may not be worth the effort at the moment and may require more holistic changes to the UI. |
Here's a small change that only improves the error message: main...alexmojaki:dvc:remove-file-message Now when you run
it says
and similarly instead of
it says
|
Great idea @alexmojaki! Let's go with that, thank you 🙏 . |
Description
As a further improvement of #4497, the support of using file as a target for
dvc remove
command should be added.Here is what @skshetry says (#5236 (comment)):
@efiop made another point (#4497 (comment)) based on a user's feedback:
/cc @efiop @skshetry
The text was updated successfully, but these errors were encountered: