diff --git a/foxglove/cmd/import.go b/foxglove/cmd/import.go index af5833b..dab2c9c 100644 --- a/foxglove/cmd/import.go +++ b/foxglove/cmd/import.go @@ -52,6 +52,7 @@ func newImportCommand(params *baseParams, commandName string) (*cobra.Command, e importCmd := &cobra.Command{ Use: fmt.Sprintf("%s [FILE]", commandName), Short: "Import a data file to Foxglove Data Platform", + Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { if edgeRecordingID != "" { err := importFromEdge(params.baseURL, *params.clientID, params.token, params.userAgent, edgeRecordingID) @@ -61,9 +62,6 @@ func newImportCommand(params *baseParams, commandName string) (*cobra.Command, e return } - if len(args) == 0 { - dief("Filename not specified") - } filename := args[0] err := executeImport( params.baseURL,