Skip to content
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

cli: fix overwriting remotes in dvc remote add #1808

Merged
merged 3 commits into from
Mar 31, 2019
Merged

cli: fix overwriting remotes in dvc remote add #1808

merged 3 commits into from
Mar 31, 2019

Conversation

puhoshville
Copy link
Contributor

Now, dvc remote add requires user confirmation in case of overwriting of an already existing remote.

Fixes #1760

Looks like:

$ dvc remote list
dvc	s3://dvc-share/dvc/
$ dvc remote add dvc s3://something/new
Error: unable to remove or overwrite 'remote "dvc"' without a confirmation from the user. Use '-f' to force. - unable to remove or overwrite 'remote "dvc"' without a confirmation from the user. Use '-f' to force.

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!

$ dvc remote add -f dvc s3://something/new
$ dvc remote list
dvc	s3://something/new

Now dvc remote add requires user confirmation in case of overwriting of
an already existing remote.

Fixes #1760
Copy link
Contributor

@efiop efiop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @puhoshville ! A few minor comments down below.

dvc/command/remote.py Outdated Show resolved Hide resolved
dvc/exceptions.py Outdated Show resolved Hide resolved
tests/test_remote.py Outdated Show resolved Hide resolved
efiop and others added 2 commits March 30, 2019 21:21
test_overwrite: fix case of none-zero result on initial stage

Co-Authored-By: puhoshville <[email protected]>
Copy link
Contributor

@efiop efiop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @puhoshville !

@efiop efiop merged commit cbdb18f into iterative:master Mar 31, 2019
@puhoshville puhoshville deleted the issue-1760 branch April 2, 2019 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants