Skip to content

Commit 3e84d70

Browse files
committed
more robust clone check
1 parent 5946316 commit 3e84d70

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/main/java/com/neuronrobotics/bowlerstudio/BowlerStudio.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -718,15 +718,17 @@ private static void makeSymLinkOfCurrentVersion() throws Exception {
718718

719719
public static void ensureUpdated(boolean check,String ... urls) {
720720
for(String s:urls) {
721-
Log.debug("Updating "+s);
721+
722722
if(s==null)
723723
continue;
724724
try {
725-
File wd = ScriptingEngine.cloneRepo(s, null);
726-
if(check && wd.exists())
725+
File wd = ScriptingEngine.getRepositoryCloneDirectory(s);
726+
if(check && wd.exists()) {
727+
Log.error("Skipping update, clone exists "+s);
727728
continue;
728-
ScriptingEngine.filesInGit(s);
729-
com.neuronrobotics.sdk.common.Log.debug("Pulling "+s);
729+
}
730+
Log.debug("Pulling "+s);
731+
ScriptingEngine.cloneRepo(s, null);
730732
ScriptingEngine.pull(s);
731733
} catch (Throwable e) {
732734
// Auto-generated catch block

0 commit comments

Comments
 (0)