Fix error code 20 when doing msm default

When running `msm default` the expected error code 20 (skill is already
installed) is always reported (unless the skills directory is empty).
This commit supressess that error to not confuse any users.
pull/1525/head
Åke Forslund 2018-04-06 13:31:18 +02:00
parent 70b9b320ed
commit 4c5736d2f1
1 changed files with 6 additions and 0 deletions

View File

@ -749,6 +749,12 @@ case ${OPT} in
install_from_url_list "https://raw.githubusercontent.com/MycroftAI/mycroft-skills/master/DEFAULT-SKILLS.${mycroft_platform}" || exit_code=$?
fi
# Suppress error 20 (skill exists) since this is an expected error
# when doing `msm default`
if [ ${exit_code} == 20 ]; then
exit_code=0
fi
update || exit_code=$?
mv ${mycroft_skill_folder}/.msm.tmp ${mycroft_skill_folder}/.msm
;;