(config, config_path, cfd_args, cfd_pre_args, root)
| 121 | return subprocess.run(cmd, check=expect_success, capture_output=capture_output) |
| 122 | |
| 123 | def cloudflared_cmd(config, config_path, cfd_args, cfd_pre_args, root): |
| 124 | cmd = [] |
| 125 | if root: |
| 126 | cmd += ["sudo"] |
| 127 | cmd += [config.cloudflared_binary] |
| 128 | cmd += cfd_pre_args |
| 129 | |
| 130 | if config_path is not None: |
| 131 | cmd += ["--config", str(config_path)] |
| 132 | |
| 133 | cmd += cfd_args |
| 134 | LOGGER.info(f"Run cmd {cmd} with config {config}") |
| 135 | return cmd |
| 136 | |
| 137 | @contextmanager |
| 138 | def run_cloudflared_background(cmd, allow_input, capture_output): |
no outgoing calls
no test coverage detected
searching dependent graphs…