Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

broken pipe error #6

Open
MartinMartimeo opened this issue Jul 24, 2015 · 1 comment
Open

broken pipe error #6

MartinMartimeo opened this issue Jul 24, 2015 · 1 comment

Comments

@MartinMartimeo
Copy link

$ ./pkictl create-private --type=rsa --length=2048 | ./pkictl create-public -private-key="STDIN"                                                                                                                                                                            
Flags invalid: Error reading private key: stat STDIN: no such file or directory
Usage: ./pkictl create-public [flags]

where flags is any of:
  -output="STDOUT": path to the output or STDOUT
  -private-key="": path to the private key (required)

example:
    create-public -private-key=foo.ecdsa
Error when writing output: write /dev/stdout: broken pipe
@Gibheer
Copy link
Owner

Gibheer commented Jul 24, 2015

Maybe this and #5 could be merged to one function opening the correct file handle. Something like the following

func openFile(path, default_name, default) (io.ReadWriteCloser) {
  if path == "-" || path == default_name { return open default }
  return os.OpenFile(path)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants