Skip to content

Commit

Permalink
Improve condition for parameter handling dagu-org#737
Browse files Browse the repository at this point in the history
  • Loading branch information
kriyanshii committed Jan 1, 2025
1 parent 9ae9d83 commit 7d7898d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package main
import (
"context"
"fmt"
"log"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -65,7 +66,9 @@ func runStart(cmd *cobra.Command, args []string) error {
// Get parameters from the new syntax
var params string
if argsLenAtDash := cmd.ArgsLenAtDash(); argsLenAtDash != -1 {
params = strings.Join(args[1:], " ")
params = strings.Join(args[argsLenAtDash:], " ")
log.Print(args[argsLenAtDash:])
log.Print(params)
args = args[:1]
} else {
// Get parameters from the deprecated flag
Expand Down

0 comments on commit 7d7898d

Please sign in to comment.