all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Thiago Jung Bauermann <bauermann@kolabnow.com>
Cc: 51780-done@debbugs.gnu.org
Subject: bug#51780: [PATCH] environment: Fix ‘--check’ with exported PS1 variable.
Date: Sun, 14 Nov 2021 23:16:51 +0100	[thread overview]
Message-ID: <87ilwu8jsc.fsf@gnu.org> (raw)
In-Reply-To: <20211111234648.672963-1-bauermann@kolabnow.com> (Thiago Jung Bauermann's message of "Thu, 11 Nov 2021 20:46:48 -0300")

Hi,

Thiago Jung Bauermann <bauermann@kolabnow.com> skribis:

> If your .bashrc (unnecessarily) exports PS1 and you’re in a non-login
> shell, Guix crashes:
>
> user@popigai:~$ guix shell --check coreutils
> guix shell: checking the environment variables visible from shell '/bin/bash'...
> Backtrace:
>           14 (primitive-load "/home/user/.config/guix/current/bin/g…")
> In guix/ui.scm:
>    2206:7 13 (run-guix . _)
>   2169:10 12 (run-guix-command _ . _)
> In ice-9/boot-9.scm:
>   1752:10 11 (with-exception-handler _ _ #:unwind? _ # _)
>   1752:10 10 (with-exception-handler _ _ #:unwind? _ # _)
> In guix/store.scm:
>    658:37  9 (thunk)
>    1320:8  8 (call-with-build-handler _ _)
>    1320:8  7 (call-with-build-handler #<procedure 7fe393b7c420 at g…> …)
> In guix/status.scm:
>     800:4  6 (call-with-status-report _ _)
> In guix/scripts/environment.scm:
>    951:12  5 (_)
> In guix/store.scm:
>   2119:24  4 (run-with-store #<store-connection 256.99 7fe39627e500> …)
> In guix/scripts/environment.scm:
>    521:35  3 (_ _)
> In unknown file:
>            2 (string=? ("PS1" . "${debian_chroot:+($debian_chroot)…") …)
> In ice-9/boot-9.scm:
>   1685:16  1 (raise-exception _ #:continuable? _)
>   1685:16  0 (raise-exception _ #:continuable? _)
>
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> In procedure string=: Wrong type argument in position 1 (expecting string): ("PS1" . "${debian_chroot:+($debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]${EXTRA}\\$ ")
> user@popigai:~$
>
> This is because the match pattern doesn’t expect `(vhash-assoc "PS1" actual)`
> to return a pair.
>
> * guix/scripts/environment.scm (validate-child-shell-environment): Change
> match pattern to expect a pair.

Oops, good catch!  Applied, thanks.

Ludo’.




  reply	other threads:[~2021-11-14 22:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 23:46 [bug#51780] [PATCH] environment: Fix ‘--check’ with exported PS1 variable Thiago Jung Bauermann via Guix-patches via
2021-11-14 22:16 ` Ludovic Courtès [this message]
2021-11-16  4:00   ` Thiago Jung Bauermann via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ilwu8jsc.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=51780-done@debbugs.gnu.org \
    --cc=bauermann@kolabnow.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.