Re: [PATCH 5/8] dim: avoid errors with rm $foo/ expanding to /

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

 



On Tue, Mar 21, 2017 at 01:15:59PM +0200, Jani Nikula wrote:
> On Tue, 21 Mar 2017, Daniel Vetter <daniel@xxxxxxxx> wrote:
> > On Tue, Mar 21, 2017 at 12:14:31PM +0200, Jani Nikula wrote:
> >> Fix shellcheck SC2115: Use "${var:?}" to ensure this never expands to /.
> >> 
> >> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
> >
> > I'm not sold on these because if those are ever unset, dim will fail all
> > over the place.
> 
> Yup, like at the top where we specifically ensure $DIM_PREFIX is not
> empty!
> 
> > I'm leaning towards shutting this one up.
> 
> I know, I was divided about this one as well, but erred on the safe side
> because 'rm -Rf /*' is such a huge failure mode.
> 
> I could lean either way.

Even for this failure mode it feels like noise ... I guess bash scripting
just is noise, and we'll live with it?

Saying, Ḯ'm also ok with you pushing this. We might eventually have a
command where the input is user-supplied and if absent could result in
tears. I just fixed that broken default handling for dim retip :-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux