functions: fix update_repositories to be run before "return"

Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>