This line will fail if the repo existing doesn't have an origin (i.e. current_origin_url == ''). In that case it would have to be git remote add.
Not 100% certain this is valid use case.