Skip to content
This repository has been archived by the owner on Feb 20, 2020. It is now read-only.

Commit

Permalink
Merge pull request #265 from djmitche/fix-arg-parsing
Browse files Browse the repository at this point in the history
Fix panic when --worker-runner-protocol-pipe is not supplied
  • Loading branch information
djmitche committed Dec 19, 2019
2 parents 30501d4 + 4f60ed6 commit 5fd8e48
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.go
Expand Up @@ -127,8 +127,7 @@ func main() {
// redirect stdio to the protocol pipe, if given; eventually this will
// include worker-runner protocol traffic, but for the moment it simply
// provides a way to channel generic-worker logging to worker-runner
if arguments["--worker-runner-protocol-pipe"].(string) != "" {
protocolPipe := arguments["--worker-runner-protocol-pipe"].(string)
if protocolPipe, ok := arguments["--worker-runner-protocol-pipe"].(string); ok && protocolPipe != "" {
f, err := os.OpenFile(protocolPipe, os.O_RDWR, 0)
exitOnError(CANT_CONNECT_PROTOCOL_PIPE, err, "Cannot connect to %s: %s", protocolPipe, err)

Expand Down

0 comments on commit 5fd8e48

Please sign in to comment.