MCPcopy Create free account
hub / github.com/apache/solr / run

Function run

dev-tools/scripts/logchange.py:45–52  ·  view source on GitHub ↗

Print and optionally execute a shell command.

(cmd, *, cwd, dry_run=False, check=True, capture=False)

Source from the content-addressed store, hash-verified

43
44
45def run(cmd, *, cwd, dry_run=False, check=True, capture=False):
46 """Print and optionally execute a shell command."""
47 print(f" $ {' '.join(str(c) for c in cmd)}")
48 if dry_run:
49 return subprocess.CompletedProcess(cmd, 0, stdout="", stderr="")
50 return subprocess.run(
51 cmd, cwd=cwd, capture_output=capture, text=True, check=check,
52 )
53
54
55def git(args, *, cwd, dry_run=False, check=True, capture=False):

Callers 10

gitFunction · 0.70
run_logchange_generateFunction · 0.70
cmd_prepareFunction · 0.70
get_prev_release_tagFunction · 0.70
get_gitlog_linesFunction · 0.70
scaffold_folderFunction · 0.70
pickRedirectUriMethod · 0.50

Calls 2

runMethod · 0.65
joinMethod · 0.45

Tested by

no test coverage detected