MCPcopy
hub / github.com/cli/cli / safeClose

Function safeClose

pkg/cmd/codespace/common.go:139–143  ·  view source on GitHub ↗
(closer io.Closer, err *error)

Source from the content-addressed store, hash-verified

137}
138
139func safeClose(closer io.Closer, err *error) {
140 if closeErr := closer.Close(); *err == nil {
141 *err = closeErr
142 }
143}
144
145// hasTTY indicates whether the process connected to a terminal.
146// It is not portable to assume stdin/stdout are fds 0 and 1.

Callers 9

LogsMethod · 0.70
RebuildMethod · 0.70
SSHMethod · 0.70
printOpenSSHConfigMethod · 0.70
JupyterMethod · 0.70
ListPortsMethod · 0.70
UpdatePortVisibilityMethod · 0.70
ForwardPortsMethod · 0.70
SelectMethod · 0.70

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected