MCPcopy Create free account
hub / github.com/containerd/nerdctl / processNotationIO

Function processNotationIO

pkg/signutil/notationutil.go:100–131  ·  view source on GitHub ↗
(notationCmd *exec.Cmd)

Source from the content-addressed store, hash-verified

98}
99
100func processNotationIO(notationCmd *exec.Cmd) error {
101 stdout, err := notationCmd.StdoutPipe()
102 if err != nil {
103 log.L.Warn("notation: " + err.Error())
104 }
105 stderr, err := notationCmd.StderrPipe()
106 if err != nil {
107 log.L.Warn("notation: " + err.Error())
108 }
109 if err := notationCmd.Start(); err != nil {
110 // only return err if it's critical (notation start failed.)
111 return err
112 }
113
114 scanner := bufio.NewScanner(stdout)
115 for scanner.Scan() {
116 log.L.Info("notation: " + scanner.Text())
117 }
118 if err := scanner.Err(); err != nil {
119 log.L.Warn("notation: " + err.Error())
120 }
121
122 errScanner := bufio.NewScanner(stderr)
123 for errScanner.Scan() {
124 log.L.Info("notation: " + errScanner.Text())
125 }
126 if err := errScanner.Err(); err != nil {
127 log.L.Warn("notation: " + err.Error())
128 }
129
130 return nil
131}

Callers 2

SignNotationFunction · 0.85
VerifyNotationFunction · 0.85

Calls 4

StartMethod · 0.80
InfoMethod · 0.80
ErrMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…