Skip to content

Commit

Permalink
feat: pathwar compose up now displays the compose file if debug flag …
Browse files Browse the repository at this point in the history
…is true
  • Loading branch information
Z-a-r-a-k-i committed May 15, 2020
1 parent 1f9a6f1 commit 14c977f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions go/pkg/pwcompose/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,15 @@ func Up(ctx context.Context, preparedCompose string, instanceKey string, forceRe
return nil, errcode.ErrComposeUpdateTempFile.Wrap(err)
}

// if debug flag, display updated compose file
if logger.Check(zap.DebugLevel, "") != nil {
data, err := ioutil.ReadFile(tmpPreparedComposePath)
if err != nil {
return nil, errcode.TODO.Wrap(err)
}
fmt.Println(string(data))
}

// build definitive containers
args = append(composeCliCommonArgs(tmpPreparedComposePath), "up", "--no-start")
logger.Debug("docker-compose", zap.Strings("args", args))
Expand Down

0 comments on commit 14c977f

Please sign in to comment.