bug-bash
[Top][All Lists]
Advanced

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

Re: export loses error


From: Léa Gris
Subject: Re: export loses error
Date: Tue, 9 Feb 2021 04:08:53 +0100
User-agent: Telnet/1.0 [tlh] (PDP11/DEC)

Le 09/02/2021 à 01:05, Lawrence Velázquez écrivait :
On Feb 8, 2021, at 5:29 PM, gregrwm <rhn-users@greatlakedata.com> wrote:

  $ export vim=$HOME/.GVim-v8.2.2451.glibc2.15-x86_64.AppImage
  $
  $ vimV=$($vim --version)||echo handle error here              #without
export, error is captured
fuse: failed to exec fusermount: No such file or directory
open dir error: No such file or directory
handle error here
  $
  $ export vimV=$($vim --version)||echo handle error here       #with
export, error is lost
fuse: failed to exec fusermount: No such file or directory
open dir error: No such file or directory
  $

Not a bug. Kind of annoying, sure, but not a bug.

https://mywiki.wooledge.org/BashPitfalls#local_var.3D.24.28cmd.29

vq

Or this https://github.com/koalaman/shellcheck/wiki/SC2155

Nice helping shell linter would have warned of this pitfall.



--
Léa Gris




reply via email to

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