Thank you for this response! The examples you point to confirm that the code I am trying to run is running into a known situation with OSX Catalina (and perhaps other versions)
Actually, I didn't write the code myself, and I am by no means a GO expert. Rather, the code is part of the release-1.4 of the Hyperledger Fabric (open source Blockchain codebase driven in large part by IBM).
Here are lines 44 to 52 of the file in hyperledger/fabric release-1.4 main.go file in common/tools/configtxlator (see https://github.com/hyperledger/fabric/blob/release-1.4/common/tools/configtxlator/main.go)
The 4th and 9th lines below appear to be the problematic ones.
=================
protoEncode = app.Command("proto_encode", "Converts a JSON document to protobuf.")
protoEncodeType = protoEncode.Flag("type", "The type of protobuf structure to encode to. For example, 'common.Config'.").Required().String()
protoEncodeSource = protoEncode.Flag("input", "A file containing the JSON document.").Default(os.Stdin.Name()).File()
protoEncodeDest = protoEncode.Flag("output", "A file to write the output to.").Default(os.Stdout.Name()).OpenFile(os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600)
protoDecode = app.Command("proto_decode", "Converts a proto message to JSON.")
protoDecodeType = protoDecode.Flag("type", "The type of protobuf structure to decode from. For example, 'common.Config'.").Required().String()
protoDecodeSource = protoDecode.Flag("input", "A file containing the proto message.").Default(os.Stdin.Name()).File()
protoDecodeDest = protoDecode.Flag("output", "A file to write the JSON document to.").Default(os.Stdout.Name()).OpenFile(os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600)
=================
I believe that this works on most linux systems (e.g., ubuntu) and probably older versions of OSX. When I run the program on Catalina I get the error "configtxlator: error: open /dev/stdout: permission denied, try --help", which is being generated by the GO code somewhere. Also, a file is supposed to be written into a local directory, but when I run the code the file is created but ends up being empty.
I am supposing that the use of stdout is for some logging/feedback, and perhaps that is unimportant. I suppose I could rewrite the code to simply write to the target file and not bother with any logging, at least not any logging to /dev/stdout.
Thanks