manjaro / pacman-mirrors

This repo has been archived. Our code is now hosted at
https://gitlab.manjaro.org
GNU General Public License v3.0
25 stars 16 forks source link

API: '--get-branch' exit code is 1 #106

Closed cubanpit closed 7 years ago

cubanpit commented 7 years ago

Hi, I am trying to use pacman-mirrors in a script and I discovered the beautiful "API mode" that could help me in order to get the Manjaro branch of the users, the problem is that the command returns the right branch but exit with error code 1. This is not an expected behaviour and makes it less convenient to use the API in a script with set -e enabled (exit at any error).

Manjaro stable up-to-date pacman-mirrors 4.2.0

fhdk commented 7 years ago

I see what you mean. I will change so it prints the branch and exit with zero.

fhdk commented 7 years ago

This change should fix the issue (line 268->). https://github.com/manjaro/pacman-mirrors/commit/5c20a08e341cc89ea727e8e138bf6099826aaa7f#diff-8ac0971ff07be702ae74be17e89bea5d