MCPcopy Create free account
hub / github.com/helm/helm / openPassphraseFile

Function openPassphraseFile

pkg/cmd/plugin_package.go:204–216  ·  view source on GitHub ↗

copied from action.openPassphraseFile TODO: should we move this to pkg/action so we can reuse the func from there?

(passphraseFile string, stdin *os.File)

Source from the content-addressed store, hash-verified

202// copied from action.openPassphraseFile
203// TODO: should we move this to pkg/action so we can reuse the func from there?
204func openPassphraseFile(passphraseFile string, stdin *os.File) (*os.File, error) {
205 if passphraseFile == "-" {
206 stat, err := stdin.Stat()
207 if err != nil {
208 return nil, err
209 }
210 if (stat.Mode() & os.ModeNamedPipe) == 0 {
211 return nil, errors.New("specified reading passphrase from stdin, without input on stdin")
212 }
213 return stdin, nil
214 }
215 return os.Open(passphraseFile)
216}

Callers 1

passphraseFileFetcherMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…