MCPcopy Create free account
hub / github.com/cloudflare/cloudflared / _run_command

Method _run_command

component-tests/cli.py:20–25  ·  view source on GitHub ↗
(self, subcmd, subcmd_name, needs_to_pass=True)

Source from the content-addressed store, hash-verified

18 self.logger = logger
19
20 def _run_command(self, subcmd, subcmd_name, needs_to_pass=True):
21 cmd = self.basecmd + subcmd
22 # timeout limits the time a subprocess can run. This is useful to guard against running a tunnel when
23 # command/args are in wrong order.
24 result = run_subprocess(cmd, subcmd_name, self.logger, check=needs_to_pass, capture_output=True, timeout=15)
25 return result
26
27 def list_tunnels(self):
28 cmd_args = ["list", "--output", "json"]

Callers 2

list_tunnelsMethod · 0.95
get_tunnel_infoMethod · 0.95

Calls 1

run_subprocessFunction · 0.85

Tested by

no test coverage detected