mirror of
https://github.com/Infisical/infisical.git
synced 2025-08-03 20:23:35 +00:00
Cleanup
This commit is contained in:
@@ -312,6 +312,5 @@ func execCmd(cmd *exec.Cmd) error {
|
||||
|
||||
waitStatus := cmd.ProcessState.Sys().(syscall.WaitStatus)
|
||||
os.Exit(waitStatus.ExitStatus())
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@@ -116,7 +116,7 @@ var secretsCmd = &cobra.Command{
|
||||
secrets = util.ExpandSecrets(secrets, authParams, "")
|
||||
}
|
||||
|
||||
// convert secrets to the same order as the keys
|
||||
// Sort the secrets by key so we can create a consistent output
|
||||
secrets = util.SortSecretsByKeys(secrets)
|
||||
|
||||
visualize.PrintAllSecretDetails(secrets)
|
||||
|
@@ -53,8 +53,8 @@ func GetBase64DecodedSymmetricEncryptionDetails(key string, cipher string, IV st
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Helper function to sort the secrets by key so we can create a consistent output
|
||||
func SortSecretsByKeys(secrets []models.SingleEnvironmentVariable) []models.SingleEnvironmentVariable {
|
||||
// sort secrets by key
|
||||
for i := 0; i < len(secrets); i++ {
|
||||
for j := i + 1; j < len(secrets); j++ {
|
||||
if secrets[i].Key > secrets[j].Key {
|
||||
|
Reference in New Issue
Block a user