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