shell: Handle '--emulate-fhs' in 'guix shell', not in 'guix environment'.
authorLudovic Courtès <ludo@gnu.org>
Thu, 13 Oct 2022 13:52:43 +0000 (15:52 +0200)
committerLudovic Courtès <ludo@gnu.org>
Thu, 13 Oct 2022 13:56:56 +0000 (15:56 +0200)
commit8b192c5550213911f930594f4fd7386f36618237
treeab0a0715f95d0db36e1d6ccba7aff4ab194188ce
parent10d429f2fce321d8285684503094694ec3979865
shell: Handle '--emulate-fhs' in 'guix shell', not in 'guix environment'.

Previously, using 'guix shell -CF coreutils' twice (such that the
profile is cache) would result in:

  guix shell: error: '--profile' cannot be used with package options

This patch fixes it by moving argument handling to (guix scripts shell),
before 'options-with-caching' is called.

* guix/scripts/environment.scm (show-environment-options-help)
(%options): Remove '--emulate-fhs'.
(guix-environment*): Pass OPTS as-is to 'options/resolve-packages'.
* guix/scripts/shell.scm (show-help, %options): Add '--emulate-fhs'.
Add the (expression . ...) component to RESULT right from the argument
handler.
* tests/guix-environment-container.sh: Change '--emulate-fhs' tests to
use 'guix shell' instead of 'guix environment'.
guix/scripts/environment.scm
guix/scripts/shell.scm
tests/guix-environment-container.sh