mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 23:10:42 +01:00
17 lines
405 B
Python
17 lines
405 B
Python
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()
|