Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ dapr init --redis-stack
}

if !utils.IsValidContainerRuntime(containerRuntime) {
print.FailureStatusEvent(os.Stdout, "Invalid container runtime. Supported values are docker and podman.")
print.FailureStatusEvent(os.Stderr, "Invalid container runtime. Supported values are docker and podman.")
os.Exit(1)
}

Expand Down
8 changes: 4 additions & 4 deletions cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ func outputList(list interface{}, length int) {
if outputFormat == "json" || outputFormat == "yaml" {
err := utils.PrintDetail(os.Stdout, outputFormat, list)
if err != nil {
print.FailureStatusEvent(os.Stdout, err.Error())
print.FailureStatusEvent(os.Stderr, err.Error())
os.Exit(1)
}
} else {
table, err := gocsv.MarshalString(list)
if err != nil {
print.FailureStatusEvent(os.Stdout, err.Error())
print.FailureStatusEvent(os.Stderr, err.Error())
os.Exit(1)
}

Expand Down Expand Up @@ -72,13 +72,13 @@ dapr list -k --all-namespaces
`,
PreRun: func(cmd *cobra.Command, args []string) {
if outputFormat != "" && outputFormat != "json" && outputFormat != "yaml" && outputFormat != "table" {
print.FailureStatusEvent(os.Stdout, "An invalid output format was specified.")
print.FailureStatusEvent(os.Stderr, "An invalid output format was specified.")
os.Exit(1)
}
},
Run: func(cmd *cobra.Command, args []string) {
if kubernetesMode {
print.WarningStatusEvent(os.Stdout, "In future releases, this command will only query the \"default\" namespace by default. Please use the --namespace flag for a specific namespace, or the --all-namespaces (-A) flag for all namespaces.")
print.WarningStatusEvent(os.Stderr, "In future releases, this command will only query the \"default\" namespace by default. Please use the --namespace flag for a specific namespace, or the --all-namespaces (-A) flag for all namespaces.")
if allNamespaces {
resourceNamespace = meta_v1.NamespaceAll
} else if resourceNamespace == "" {
Expand Down
2 changes: 1 addition & 1 deletion cmd/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ dapr uninstall --runtime-path <path-to-install-directory>
err = kubernetes.Uninstall(uninstallNamespace, uninstallAll, uninstallDev, timeout)
} else {
if !utils.IsValidContainerRuntime(uninstallContainerRuntime) {
print.FailureStatusEvent(os.Stdout, "Invalid container runtime. Supported values are docker and podman.")
print.FailureStatusEvent(os.Stderr, "Invalid container runtime. Supported values are docker and podman.")
os.Exit(1)
}
print.InfoStatusEvent(os.Stdout, "Removing Dapr from your machine...")
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dapr version --output json
`,
Run: func(cmd *cobra.Command, args []string) {
if output != "" && output != "json" {
print.FailureStatusEvent(os.Stdout, "An invalid output format was specified.")
print.FailureStatusEvent(os.Stderr, "An invalid output format was specified.")
os.Exit(1)
}
switch output {
Expand Down
2 changes: 1 addition & 1 deletion cmd/workflow/raiseevent.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var RaiseEventCmd = &cobra.Command{
}

if err = workflow.RaiseEvent(ctx, opts); err != nil {
print.FailureStatusEvent(os.Stdout, err.Error())
print.FailureStatusEvent(os.Stderr, err.Error())
os.Exit(1)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/workflow/rerun.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var ReRunCmd = &cobra.Command{

id, err := workflow.ReRun(ctx, opts)
if err != nil {
print.FailureStatusEvent(os.Stdout, err.Error())
print.FailureStatusEvent(os.Stderr, err.Error())
os.Exit(1)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/workflow/resume.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var ResumeCmd = &cobra.Command{
}

if err = workflow.Resume(ctx, opts); err != nil {
print.FailureStatusEvent(os.Stdout, err.Error())
print.FailureStatusEvent(os.Stderr, err.Error())
os.Exit(1)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/workflow/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var RunCmd = &cobra.Command{

id, err := workflow.Run(ctx, opts)
if err != nil {
print.FailureStatusEvent(os.Stdout, err.Error())
print.FailureStatusEvent(os.Stderr, err.Error())
os.Exit(1)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/workflow/suspend.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var SuspendCmd = &cobra.Command{
}

if err = workflow.Suspend(ctx, opts); err != nil {
print.FailureStatusEvent(os.Stdout, err.Error())
print.FailureStatusEvent(os.Stderr, err.Error())
os.Exit(1)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/workflow/terminate.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var TerminateCmd = &cobra.Command{
}

if err = workflow.Terminate(ctx, opts); err != nil {
print.FailureStatusEvent(os.Stdout, err.Error())
print.FailureStatusEvent(os.Stderr, err.Error())
os.Exit(1)
}

Expand Down
Loading