MCPcopy Create free account
hub / github.com/NanoNets/docstrange / run_command

Function run_command

scripts/setup_dev.py:11–21  ·  view source on GitHub ↗

Run a command and handle errors.

(command, description)

Source from the content-addressed store, hash-verified

9
10
11def run_command(command, description):
12 """Run a command and handle errors."""
13 print(f"🔄 {description}...")
14 try:
15 result = subprocess.run(command, shell=True, check=True, capture_output=True, text=True)
16 print(f"✅ {description} completed successfully")
17 return True
18 except subprocess.CalledProcessError as e:
19 print(f"❌ {description} failed: {e}")
20 print(f"Error output: {e.stderr}")
21 return False
22
23
24def main():

Callers 1

mainFunction · 0.85

Calls 1

runMethod · 0.80

Tested by

no test coverage detected