about summary refs log tree commit diff
path: root/pkgs/tools/nix
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2023-05-10 17:33:33 -0400
committerGitHub <noreply@github.com>2023-05-10 17:33:33 -0400
commit57445260f0b39bb5042d92c26cf613d0c9a75e00 (patch)
tree58a0828935888bc891233e6b0af37277d43db1e0 /pkgs/tools/nix
parent0c211eb0642a15967ca3261a492fce80221880e3 (diff)
parenteb811a6ee0ca939df84a8f87934a06065eb15cae (diff)
Merge pull request #229113 from aschmolck/fix-nix-info-help
Fix nix-info --help to exit 0
Diffstat (limited to 'pkgs/tools/nix')
-rwxr-xr-xpkgs/tools/nix/info/info.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/tools/nix/info/info.sh b/pkgs/tools/nix/info/info.sh
index 6ec8273504692..15bed4af74d43 100755
--- a/pkgs/tools/nix/info/info.sh
+++ b/pkgs/tools/nix/info/info.sh
@@ -51,9 +51,14 @@ Options:
  -d, --debug      debug mode
 
 EOF
-            exit 1
-            ;;
-
+            case "${1:-}" in
+                -h|--help)
+                    exit 0
+                    ;;
+                *)
+                    exit 1
+                    ;;
+            esac
     esac
 done