summaryrefslogtreecommitdiffstats
path: root/.local/bin/compiler
diff options
context:
space:
mode:
authoranntnzrb <51257127+anntnzrb@users.noreply.github.com>2020-07-05 15:17:49 -0500
committerGitHub <noreply@github.com>2020-07-05 16:17:49 -0400
commit53cdc0eb9579770b326fbf61876051cb84185c2d (patch)
tree54769205b931bd7debe3486877d757f2c0086898 /.local/bin/compiler
parent8cba946027f53db3c60a66a0822eeae173c5f743 (diff)
downloadeibhear-53cdc0eb9579770b326fbf61876051cb84185c2d.tar.gz
eibhear-53cdc0eb9579770b326fbf61876051cb84185c2d.tar.zst
eibhear-53cdc0eb9579770b326fbf61876051cb84185c2d.zip
Prevent user-defined aliases/commands checking (#748)
Adding `[ -x ]` also checks if the command is an executable; if this check is skipped, then user-defined aliases will interfere and validate the condition (unintended).
Diffstat (limited to '.local/bin/compiler')
-rwxr-xr-x.local/bin/compiler4
1 files changed, 2 insertions, 2 deletions
diff --git a/.local/bin/compiler b/.local/bin/compiler
index 213013e..ac3b845 100755
--- a/.local/bin/compiler
+++ b/.local/bin/compiler
@@ -32,9 +32,9 @@ case "$ext" in
go) go run "$file" ;;
h) sudo make install ;;
m) octave "$file" ;;
- md) if command -v lowdown >/dev/null; then
+ md) if [ -x "$(command -v lowdown)" ] >/dev/null; then
lowdown -d nointem -e super "$file" -Tms | groff -mpdfmark -ms -kept > "$base".pdf
- elif command -v groffdown >/dev/null; then
+ elif [ -x "$(command -v groffdown)" ] >/dev/null; then
groffdown -i "$file" | groff > "$base.pdf"
else
pandoc "$file" --pdf-engine=xelatex -o "$base".pdf