Skip to content

Commit

Permalink
Merge pull request #148 from kevinrobayna/fix_114
Browse files Browse the repository at this point in the history
Concatenate args to avoid out of bound issues
  • Loading branch information
joshmedeski committed Aug 23, 2024
2 parents f999ba7 + 119c67f commit ab4243f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion seshcli/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package seshcli
import (
"errors"
"fmt"
"strings"

"github.com/joshmedeski/sesh/connector"
"github.com/joshmedeski/sesh/icon"
Expand Down Expand Up @@ -62,7 +63,7 @@ func Connect(c connector.Connector, i icon.Icon) *cli.Command {
if cCtx.NArg() == 0 {
return errors.New("please provide a session name")
}
name := cCtx.Args().First()
name := strings.Join(cCtx.Args().Slice(), " ")
if name == "" {
return nil
}
Expand Down

0 comments on commit ab4243f

Please sign in to comment.