Skip to content

Commit

Permalink
Be clever about cutoff
Browse files Browse the repository at this point in the history
  • Loading branch information
sourishkrout committed Nov 5, 2024
1 parent fcea599 commit 3d93f91
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion internal/cmd/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,21 @@ func printStore(cmd *cobra.Command, msgData *runnerv1.MonitorEnvStoreResponse_Sn
table.AddField(strings.ToUpper("Updated"))
table.EndRow()

specless := true
for i, _ := range msgData.Snapshot.Envs {
backwards := msgData.Snapshot.Envs[len(msgData.Snapshot.Envs)-i-1]
if backwards.Spec != owl.AtomicNameOpaque {
specless = false
lines = len(msgData.Snapshot.Envs) - i
break
}
}

for i, env := range msgData.Snapshot.Envs {
if i >= lines && !all {
break
}

specless := msgData.Snapshot.Envs[0].Spec != owl.AtomicNameOpaque
if !all && specless && env.Spec == owl.AtomicNameOpaque {
break
}
Expand Down

0 comments on commit 3d93f91

Please sign in to comment.