Skip to content

Commit d31319b

Browse files
authored
Merge pull request #101 from helgi/deployments
fix(ps): restarting a single pod created by Deployments was not working
2 parents 87b87ca + c425baf commit d31319b

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
@@ -92,9 +92,10 @@ func PsRestart(appID, target string) error {
9292

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

0 commit comments

Comments
 (0)