Skip to content

Commit

Permalink
Merge pull request #1977 from kotapeter/fix-args-display-inspect
Browse files Browse the repository at this point in the history
fix: display `Command` remaining parts if `Args` is `nil`
  • Loading branch information
jjbustamante authored Jan 18, 2024
2 parents 3f1ecb2 + 249038f commit 5dffab6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/inspectimage/info_display.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,17 @@ func convertToDisplay(proc launch.Process, isDefault bool) ProcessDisplay {
case false:
shell = "bash"
}
var argsToUse []string
if len(proc.Command.Entries) > 1 {
argsToUse = proc.Command.Entries[1:]
}
argsToUse = append(argsToUse, proc.Args...)
result := ProcessDisplay{
Type: proc.Type,
Shell: shell,
Command: proc.Command.Entries[0],
Default: isDefault,
Args: proc.Args, // overridable args are supported for platform API >= 0.10 with buildpack API >= 0.9, but we can't determine the buildpack API from the metadata label (to be fixed in platform 0.11)
Args: argsToUse, // overridable args are supported for platform API >= 0.10 with buildpack API >= 0.9, but we can't determine the buildpack API from the metadata label (to be fixed in platform 0.11)
WorkDir: proc.WorkingDirectory,
}

Expand Down

0 comments on commit 5dffab6

Please sign in to comment.