mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-29 07:18:27 +01:00
dvc: introduce dvc cache dir command
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import os
|
||||
|
||||
from dvc.command.config import CmdConfig
|
||||
|
||||
|
||||
class CmdCacheDir(CmdConfig):
|
||||
def run(self):
|
||||
self.args.name = 'cache.dir'
|
||||
|
||||
path = self.args.value
|
||||
if not os.path.isabs(path):
|
||||
config_dir = os.path.dirname(self.configobj.filename)
|
||||
path = os.path.relpath(path, config_dir)
|
||||
self.args.value = path
|
||||
|
||||
return super(CmdCacheDir, self).run()
|
||||
Reference in New Issue
Block a user