Skip to content

Commit 9d0aab7

Browse files
committed
cli: nicer output
Signed-off-by: Paul Meyer <[email protected]>
1 parent e73e41b commit 9d0aab7

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

cli/cmd/generate.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ func runGenerate(cmd *cobra.Command, args []string) error {
8484
if err := generatePolicies(cmd.Context(), flags.policyPath, flags.settingsPath, paths, log); err != nil {
8585
return fmt.Errorf("failed to generate policies: %w", err)
8686
}
87+
fmt.Fprintln(cmd.OutOrStdout(), "✔️ Generated workload policy annotations")
8788

8889
policies, err := policiesFromKubeResources(paths)
8990
if err != nil {
@@ -132,7 +133,7 @@ func runGenerate(cmd *cobra.Command, args []string) error {
132133
return fmt.Errorf("failed to write manifest: %w", err)
133134
}
134135

135-
log.Info("Updated manifest", "path", flags.manifestPath)
136+
fmt.Fprintf(cmd.OutOrStdout(), "✔️ Updated manifest %s\n", flags.manifestPath)
136137

137138
if hash := getCoordinatorPolicyHash(policies, log); hash != "" {
138139
if err := os.WriteFile(coordHashFilename, []byte(hash), 0o644); err != nil {

cli/cmd/set.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ func runSet(cmd *cobra.Command, args []string) error {
132132
fmt.Fprintln(cmd.OutOrStdout(), msg)
133133
}
134134
}
135-
return fmt.Errorf("failed to set manifest: %w", err)
135+
return fmt.Errorf("setting manifest: %w", err)
136136
}
137137

138-
fmt.Fprintln(cmd.OutOrStdout(), "Manifest set successfully")
138+
fmt.Fprintln(cmd.OutOrStdout(), "✔️ Manifest set successfully")
139139

140140
filelist := map[string][]byte{
141141
coordRootPEMFilename: resp.CACert,

cli/cmd/verify.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func runVerify(cmd *cobra.Command, _ []string) error {
102102
return fmt.Errorf("writing filelist: %w", err)
103103
}
104104

105-
fmt.Fprintln(cmd.OutOrStdout(), "Successfully verified coordinator")
105+
fmt.Fprintln(cmd.OutOrStdout(), "✔️ Successfully verified coordinator")
106106

107107
return nil
108108
}

0 commit comments

Comments
 (0)