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

config: dvc config doesn't throw an error when used outside of a dvc repository without --system or --global #2309

Closed
ghost opened this issue Jul 22, 2019 · 7 comments
Labels
bug Did we break something? p1-important Important, aka current backlog of things to do

Comments

@ghost
Copy link

ghost commented Jul 22, 2019

DVC version: 0.52.1+1e9f1d
Python version: 3.7.3
Platform: Linux-5.2.1-arch1-1-ARCH-x86_64-with-arch
Binary: False
Filesystem type (workspace): ('xfs', '/dev/mapper/vg-root')

rm -rf .dvc
dvc remote modify something whatever yeah

Expected

ERROR: you are not inside of a dvc repository (checked up to mount point '/')
@ghost ghost added the enhancement Enhances DVC label Jul 22, 2019
@efiop
Copy link
Contributor

efiop commented Jul 22, 2019

@MrOutis Remotes can be defined in global or system configs. This is not a bug.

@efiop efiop closed this as completed Jul 22, 2019
@efiop
Copy link
Contributor

efiop commented Jul 22, 2019

Ah, wait. So the .dvc is removed... So looks like running that command anywhere will create .dvc/config, right? Re-opening. Sorry for jumping on this one.

@efiop efiop reopened this Jul 22, 2019
@efiop efiop added bug Did we break something? p3-nice-to-have It should be done this or next sprint and removed enhancement Enhances DVC labels Jul 22, 2019
@ghost
Copy link
Author

ghost commented Jul 22, 2019

@efiop , running dvc remote modify on a directory which is not a DVC repository doesn't do anything at all. You are right, --system and --global shouldn't throw an error, but for --local and without any flag, it should.

@efiop
Copy link
Contributor

efiop commented Jan 19, 2020

Issue is relevant for dvc config in general, as dvc remote derives from it. Some explanation #3194 (review) . Adjusting the naming...

@efiop efiop changed the title remote: dvc remote modify doesn't throw an error when used outside of a dvc repository config: dvc config doesn't throw an error when used outside of a dvc repository without --system or --global Jan 19, 2020
@efiop efiop added p1-important Important, aka current backlog of things to do and removed p3-nice-to-have It should be done this or next sprint labels Jan 19, 2020
@efiop efiop assigned ghost Jan 22, 2020
@efiop efiop unassigned ghost Jan 28, 2020
@efiop
Copy link
Contributor

efiop commented Jan 28, 2020

Related #2234 , should be fixed by the redesign.

@efiop
Copy link
Contributor

efiop commented Jan 28, 2020

For the record, this might require full config refactor (and likely will), so please check back before tackling this one, just to make sure that we are on the same page.

@efiop
Copy link
Contributor

efiop commented May 3, 2021

Fixed.

@efiop efiop closed this as completed May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Did we break something? p1-important Important, aka current backlog of things to do
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant