fix pre-commit and cleanup
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/truecharts/public/clustertool/pkg/sops"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/truecharts/public/clustertool/pkg/sops"
|
||||
)
|
||||
|
||||
var precommit = &cobra.Command{
|
||||
Use: "precommit",
|
||||
Short: "Runs the PreCommit encryption check",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if err := sops.CheckFilesAndReportEncryption(true, true); err != nil {
|
||||
log.Info().Msgf("Error checking files: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
},
|
||||
Use: "precommit",
|
||||
Short: "Runs the PreCommit encryption check",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if err := sops.CheckFilesAndReportEncryption(true, true); err != nil {
|
||||
log.Info().Msgf("Error checking files: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
adv.AddCommand(precommit)
|
||||
adv.AddCommand(precommit)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user