guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#43616] [PATCH] tests: Simplify shell exit status negation;


From: Ludovic Courtès
Subject: [bug#43616] [PATCH] tests: Simplify shell exit status negation;
Date: Sat, 26 Sep 2020 23:12:32 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hi Eric,

bavier@posteo.net skribis:

> From: Eric Bavier <bavier@member.fsf.org>
>
> * tests/guix-archive.sh, tests/guix-build-branch.sh, tests/guix-build.sh,
> tests/guix-daemon.sh, tests/guix-download.sh, tests/guix-environment.sh,
> tests/guix-gc.sh, tests/guix-git-authenticate.sh, tests/guix-graph.sh,
> tests/guix-hash.sh, tests/guix-lint.sh, tests/guix-pack-relocatable.sh,
> tests/guix-pack.sh, tests/guix-package-aliases.sh, tests/guix-package-net.sh,
> tests/guix-package.sh: Use the shell '!' keyword to negate command exit status
> in place of 'if ...; then false; else true; fi'

[...]

> -if guix archive something-that-does-not-exist
> -then false; else true; fi
> +! guix archive something-that-does-not-exist

I have a vague recollection that I came to the conclusion that the ‘if’
was needed, but now I don’t see why.

If you’re confident please go ahead!  It’s never too late for me to
improve my shell knowledge.  :-)

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]