MCPcopy
hub / github.com/catppuccin/catppuccin / tfs_root

Function tfs_root

samples/python1.py:55–66  ·  view source on GitHub ↗
(directory)

Source from the content-addressed store, hash-verified

53
54
55def tfs_root(directory):
56 try:
57 tf_cmd = get_user_command('tf') or 'tf'
58 command = [tf_cmd, 'workfold', directory]
59 p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
60 shell=True, universal_newlines=False)
61 out, err = p.communicate()
62 m = re.search(r"^ \$\S+: (\S+)$", out, re.MULTILINE)
63 if m:
64 return {'root': m.group(1), 'name': 'tf', 'cmd': tf_cmd}
65 except:
66 return None
67
68
69def get_vcs(directory):

Callers 1

get_vcsFunction · 0.85

Calls 1

get_user_commandFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…