File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ var mergeYamlCmd = &cobra.Command{
4646 if outFile == "" {
4747 fmt .Println (string (config ))
4848 } else {
49- if err := os .WriteFile (outFile , config , 0644 ); err != nil {
49+ if err := os .WriteFile (outFile , config , 0o644 ); err != nil {
5050 cmd .Annotations ["error" ] = err .Error ()
5151 return
5252 }
@@ -56,6 +56,7 @@ var mergeYamlCmd = &cobra.Command{
5656 // Wait for a second to allow for any pending log messages to be flushed
5757 time .Sleep (1 * time .Second )
5858 if cmd .Annotations ["error" ] != "" {
59+ fmt .Printf ("Error: %s\n " , cmd .Annotations ["error" ])
5960 os .Exit (1 )
6061 }
6162 },
Original file line number Diff line number Diff line change 33# check if /config.yaml exists
44if [ ! -f /config.yaml ]; then
55 /docker-sync mergeYaml -o /config.yaml -f /config_map.yaml -f /secret.yaml
6+ if [ $? -ne 0 ]; then
7+ echo " Error merging YAML files. Exiting."
8+ exit 1
9+ fi
610fi
711
812/docker-sync " $@ "
You can’t perform that action at this time.
0 commit comments