Skip to content

Commit 4252271

Browse files
committed
plugins/ciel-switchmirror: minor lint ...
... on the if ... $? syntax
1 parent 539c0f4 commit 4252271

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plugins/ciel-switchmirror

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ export CIEL_INST="ciel--switchmirror--"
55

66
ciel add "$CIEL_INST"
77
if [ "$1" != "" ]; then
8-
ciel shell oma mirror add "$1"
9-
if [ "$?" != "0" ]; then
8+
if ! ciel shell oma mirror add "$1"; then
109
echo -e "\e[1m\e[91m[switch-mirror]:\e[0m\e[1m Failed to set mirror '$1'.\e[0m"
1110
echo -e "\e[1m\e[91m[switch-mirror]:\e[0m\e[1m More information please refer to the error oma had reported.\e[0m"
1211
exit 1

0 commit comments

Comments
 (0)