fix bug in non git directories