Skip to content

Commit c425baf

Browse files
committed
fix(ps): restarting a single pod created by Deployments was not working
Deployments created a different pod name then what RCs do (we have less flexibility): oddest-lungfish-cmd-1269180282-60byi
1 parent 07cb4e9 commit c425baf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cmd/ps.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,10 @@ func PsRestart(appID, target string) error {
9191

9292
if target != "" {
9393
if strings.Contains(target, "-") {
94-
parts := strings.Split(target, "-")
94+
replaced := strings.Replace(target, appID + "-", "", 1)
95+
parts := strings.Split(replaced, "-")
9596
// the API requires the type, for now
96-
psType = parts[len(parts)-2]
97+
psType = parts[0]
9798
// process name is the full pod
9899
psName = target
99100
} else {

0 commit comments

Comments
 (0)