Skip to content

Commit cf6178a

Browse files
fix prerun not being called (#238)
1 parent be8756e commit cf6178a

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=v0.0.218
1+
VERSION=v0.0.219
22

33
OUT_DIR=dist
44
YEAR?=$(shell date +"%Y")

docs/releases/release_notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cf version
2323

2424
```bash
2525
# download and extract the binary
26-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.218/cf-linux-amd64.tar.gz | tar zx
26+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.219/cf-linux-amd64.tar.gz | tar zx
2727

2828
# move the binary to your $PATH
2929
mv ./cf-linux-amd64 /usr/local/bin/cf
@@ -36,7 +36,7 @@ cf version
3636

3737
```bash
3838
# download and extract the binary
39-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.218/cf-darwin-amd64.tar.gz | tar zx
39+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.219/cf-darwin-amd64.tar.gz | tar zx
4040

4141
# move the binary to your $PATH
4242
mv ./cf-darwin-amd64 /usr/local/bin/cf

manifests/runtime.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
namespace: '{{ namespace }}'
66
spec:
77
defVersion: 1.0.0
8-
version: 0.0.218
8+
version: 0.0.219
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
1010
components:
1111
- name: events

pkg/log/logrus.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (l *logrusAdapter) AddPFlags(cmd *cobra.Command) {
7979
cmd.PersistentFlags().AddFlagSet(flags)
8080

8181
initFunc := func(cmd *cobra.Command) {
82-
orgPreRun := cmd.PreRunE
82+
orgPreRunE := cmd.PreRunE
8383

8484
cmd.PreRunE = func(cmd *cobra.Command, args []string) error {
8585
switch *format {
@@ -93,9 +93,13 @@ func (l *logrusAdapter) AddPFlags(cmd *cobra.Command) {
9393
return err
9494
}
9595

96-
if orgPreRun != nil {
97-
return orgPreRun(cmd, args)
96+
if orgPreRunE != nil {
97+
return orgPreRunE(cmd, args)
9898
}
99+
if cmd.PreRun != nil {
100+
cmd.PreRun(cmd, args)
101+
}
102+
99103
return nil
100104
}
101105
}

0 commit comments

Comments
 (0)