Skip to content
Unverified Commit 2467c437 authored by aszlig's avatar aszlig
Browse files

xdg_utils: Fix wrong substitution of grep command.

Fixes regression introduced by 16406e63

.

Not replacing "egrep" with a negated character class on [^e] needs to be
put back into the replacement, because if we have something like:

foo="$(grep xxx)"

The replacement would be something like this:

foo="$/nix/store/.../bin/grep xxx)"

Which will lead to wrong behavior and in cases of for example
"xdg-screensaver", even directly to a syntax error:

xdg-screensaver: line 178: syntax error near unexpected token `('
xdg-screensaver: line 178: `command="/nix/store/.../bin/grep -E
                            "^Exec(\[[^]=]*])?=" "$file" |
                            /nix/store/.../bin/cut -d= -f 2- |
                            first_word`"'

Signed-off-by: default avataraszlig <aszlig@redmoonstudios.org>
parent e199d9e8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment