fix(gnome-extensions): Usage of INSTALL_EXT instead of UNINSTALL_EXT in uninstall
This commit is contained in:
parent
e913396369
commit
02922a7e04
1 changed files with 3 additions and 3 deletions
|
|
@ -221,7 +221,7 @@ fi
|
|||
|
||||
if [[ ${#UNINSTALL[@]} -gt 0 ]]; then
|
||||
for UNINSTALL_EXT in "${UNINSTALL[@]}"; do
|
||||
if [[ ! "${INSTALL_EXT}" =~ ^[0-9]+$ ]]; then
|
||||
if [[ ! "${UNINSTALL_EXT}" =~ ^[0-9]+$ ]]; then
|
||||
# Literal-name extension config
|
||||
# Replaces whitespaces with %20 for install entries which contain extension name, since URLs can't contain whitespace
|
||||
# Getting json query from the website is useful to intuitively uninstall the extension without need to manually input UUID
|
||||
|
|
@ -238,10 +238,10 @@ if [[ ${#UNINSTALL[@]} -gt 0 ]]; then
|
|||
EXT_NAME=$(echo "${QUERIED_EXT}" | jq -r '.["name"]')
|
||||
else
|
||||
# PK ID extension config fallback if specified
|
||||
URL_QUERY=$(curl -s "https://extensions.gnome.org/extension-info/?pk=${INSTALL_EXT}")
|
||||
URL_QUERY=$(curl -s "https://extensions.gnome.org/extension-info/?pk=${UNINSTALL_EXT}")
|
||||
PK_EXT=$(echo "${URL_QUERY}" | jq -r '.["pk"]' 2>/dev/null)
|
||||
if [[ -z "${PK_EXT}" ]] || [[ "${PK_EXT}" == "null" ]]; then
|
||||
echo "ERROR: Extension with PK ID '${INSTALL_EXT}' does not exist in https://extensions.gnome.org/ website"
|
||||
echo "ERROR: Extension with PK ID '${UNINSTALL_EXT}' does not exist in https://extensions.gnome.org/ website"
|
||||
echo " Please assure that you typed the PK ID correctly,"
|
||||
echo " and that it exists in Gnome extensions website"
|
||||
exit 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue