Skip to content

Commit 8d08480

Browse files
committed
bug(kubectl): return resource builder error in scale cmd
1 parent d003e4c commit 8d08480

File tree

1 file changed

+3
-0
lines changed
  • staging/src/k8s.io/kubectl/pkg/cmd/scale

1 file changed

+3
-0
lines changed

staging/src/k8s.io/kubectl/pkg/cmd/scale/scale.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ func (o *ScaleOptions) RunScale() error {
229229
}
230230

231231
if len(infos) == 0 {
232+
if infoErr != nil {
233+
return fmt.Errorf("no objects passed to scale %w", infoErr)
234+
}
232235
return fmt.Errorf("no objects passed to scale")
233236
}
234237

0 commit comments

Comments
 (0)