Fix inverted detection of repo