Skip to content

Commit

Permalink
fix: config-tool cannot be opened when the Control Center dbus API ca…
Browse files Browse the repository at this point in the history
…ll fails

Updated jq command to include the -n parameter.
Returns an error when dbus-send returns empty.

Fixes linuxdeepin/developer-center#3659
  • Loading branch information
zsien committed Mar 14, 2023
1 parent 3f65377 commit fd4bc8e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ index 4daf97a..6251da9 100755
+ local dbus_interface="org.deepin.dde.ControlCenter1"
+ local dcc_module="keyboard/Manage Input Methods"
+
+ if dbus-send --print-reply=literal --dest=$dbus_service $dbus_path $dbus_interface.GetAllModule | jq -e ".[] | select(.url == \"${dcc_module}\")" >> /dev/null 2>&1; then
+ if dbus-send --print-reply=literal --dest=$dbus_service $dbus_path $dbus_interface.GetAllModule 2>> /dev/null | jq -n -e ".[] | select(.url == \"${dcc_module}\")" >> /dev/null 2>&1; then
+ exec dbus-send --print-reply=literal --dest=$dbus_service $dbus_path $dbus_interface.ShowPage string:"$dcc_module"
+ fi
+ return 1
Expand Down

0 comments on commit fd4bc8e

Please sign in to comment.