MCPcopy Create free account
hub / github.com/Samsung/UTopia / execute

Method execute

helper/git.py:71–86  ·  view source on GitHub ↗
(self, cmd)

Source from the content-addressed store, hash-verified

69 return changed_files
70
71 def execute(self, cmd) -> str:
72 logging.debug(cmd)
73 try:
74 res = subprocess.run(
75 cmd,
76 cwd=self.root_dir,
77 check=True,
78 capture_output=True,
79 text=True,
80 )
81 except subprocess.CalledProcessError as e:
82 logging.error(f"cmd: {' '.join(cmd)}")
83 logging.error(f"out: {e.stdout}")
84 logging.error(f"err: {e.stderr}")
85 raise RuntimeError("Git command failed")
86 return res.stdout

Callers 7

checkoutMethod · 0.95
diffMethod · 0.95
delete_branchMethod · 0.95
addMethod · 0.95
commitMethod · 0.95
configMethod · 0.95
changedMethod · 0.95

Calls 1

runMethod · 0.45

Tested by

no test coverage detected