summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/meta-normalize-stdio3
1 files changed, 1 insertions, 2 deletions
diff --git a/bin/meta-normalize-stdio b/bin/meta-normalize-stdio
index 0bb94ce..901ca0b 100755
--- a/bin/meta-normalize-stdio
+++ b/bin/meta-normalize-stdio
@@ -4,7 +4,7 @@ require 'yaml'
core_order = [ "username",
"fullname",
"email", # ordered list
- "groups", # unordered list
+ "groups", # ordered list
"pgp_keyid",
"pgp_revoked_keyids", # unordered list
"ssh_keys", # unordered map
@@ -26,7 +26,6 @@ _extra_order = Hash[[*extra_order.map.with_index]]
user = YAML::load(STDIN)
user = Hash[user.sort_by{|k,v| _core_order[k]}]}
-user["groups"] = user["groups"].sort if user["groups"]}
user["pgp_revoked_keyids"] = user["pgp_revoked_keyids"].sort if user["extra"]}
user["ssh_keys"] = Hash[user["ssh_keys"].sort_by{|k,v| k}] if user["ssh_keys"]}
user["extra"] = Hash[user["extra"].sort_by{|k,v| _extra_order[k]}] if user["extra"]}