Skip to content

Commit 29dc321

Browse files
authored
fix(COD-1559): Failures in Lacework CLI update checking (#1375)
1 parent e65e720 commit 29dc321

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

cli/cmd/version.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ versions available for update.
6161
Set the environment variable 'LW_UPDATES_DISABLE=1' to avoid checking for updates.`,
6262
Args: cobra.NoArgs,
6363
Run: func(_ *cobra.Command, _ []string) {
64-
componentVerionsOutput := &strings.Builder{}
64+
componentVersionsOutput := &strings.Builder{}
6565
if cli.LwComponents != nil {
6666
for _, component := range cli.LwComponents.Components {
6767
if component.IsInstalled() {
6868
v, err := component.CurrentVersion()
6969
if err == nil {
70-
componentVerionsOutput.WriteString(
70+
componentVersionsOutput.WriteString(
7171
fmt.Sprintf(" > %s v%s\n", component.Name, v.String()),
7272
)
7373
continue
@@ -86,7 +86,7 @@ Set the environment variable 'LW_UPDATES_DISABLE=1' to avoid checking for update
8686
BuildTime: BuildTime,
8787
}
8888

89-
if componentVerionsOutput.String() != "" {
89+
if componentVersionsOutput.String() != "" {
9090
vJSON.CDK = cli.LwComponents
9191
}
9292

@@ -95,13 +95,14 @@ Set the environment variable 'LW_UPDATES_DISABLE=1' to avoid checking for update
9595
}
9696

9797
cli.OutputHuman("lacework v%s (sha:%s) (time:%s)\n", Version, GitSHA, BuildTime)
98-
if componentVerionsOutput.String() != "" {
99-
cli.OutputHuman("\nComponents:\n\n%s", componentVerionsOutput.String())
98+
if componentVersionsOutput.String() != "" {
99+
cli.OutputHuman("\nComponents:\n\n%s", componentVersionsOutput.String())
100100
}
101101

102102
// check the latest version of the cli
103103
if _, err := versionCheck(); err != nil {
104-
exitwithCode(err, 4)
104+
cli.Log.Errorw("unable to perform lacework cli version check",
105+
"error", err.Error())
105106
}
106107
},
107108
}

0 commit comments

Comments
 (0)