[Lunar-commits] <lunar> fix expand_alias with NEVER_ASK=1
v4hn
v4hn at lunar-linux.org
Fri Sep 19 18:27:00 CEST 2014
commit aef4784d3a4a2befeb5eab10fac4c75b639a4a89
Author: v4hn <v4hn at lunar-linux.org>
Date: Fri, 19 Sep 2014 17:28:03 +0200
URL: https://github.com/lunar-linux/lunar/commit/aef4784d3a4a2befeb5eab10fac4c75b639a4a89
fix expand_alias with NEVER_ASK=1
Even if we shouldn't interact with the user, we should still
resolve the alias if we already know a value for it.
Please merge and push a bugfix release!
This bug removes all stored optional_depends selections
for aliases with each `lin moonbase`.
---
libs/aliases.lunar | +7/-1
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/libs/aliases.lunar
+++ b/libs/aliases.lunar
@@ -14,7 +14,7 @@
expand_alias() {
# If param doesn't start with "%", or if NEVER_ASK
# is set, just echo the param and return immediately
- if [[ "${1:0:1}" != "%" || -n "$NEVER_ASK" ]] ; then
+ if [[ "${1:0:1}" != "%" ]]; then
echo $1
return
fi
@@ -27,6 +27,12 @@ expand_alias() {
return
fi
+ if [[ -n "$NEVER_ASK" ]]; then
+ # there's no stored value for the alias and we mustn't ask for one...
+ echo $1
+ return
+ fi
+
debug_msg "expand_alias($@)"
# try to figure out where the aliases file is:
if [[ -z "$ALIASES" ]] || [[ ! -f "$ALIASES" ]]; then
More information about the Lunar-commits
mailing list