MCPcopy Create free account
hub / github.com/cli/cli / safeClose

Function safeClose

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

Source from the content-addressed store, hash-verified

138}
139
140func safeClose(closer io.Closer, err *error) {
141 if closeErr := closer.Close(); *err == nil {
142 *err = closeErr
143 }
144}
145
146// hasTTY indicates whether the process connected to a terminal.
147// 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