Skip to content

Commit 794aec0

Browse files
added check for windows path and finalize info-user
1 parent 79c7fc0 commit 794aec0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/main/java/com/francescodisalesdev/gitcli/service/GitService.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ public void cloneRepositoryBranch(String repository,String localPath,String bran
8585
String gitRepository = repository+".git";
8686

8787
ProcessBuilder processBuilder = new ProcessBuilder("git","clone","-b",branch,gitRepository);
88+
89+
if(localPath.contains("\\"))
90+
localPath.replace("\\","\\\\");
91+
8892
processBuilder.directory(new File(localPath));
8993
Process process = processBuilder.start();
9094

@@ -267,6 +271,10 @@ public void getUserInfo(String username) throws IOException
267271
Map<String,GHRepository> repository = user.getRepositories();
268272
System.out.println(repository.keySet());
269273

274+
for(Map.Entry<String, GHRepository> valuesFinal : repository.entrySet())
275+
{
276+
System.out.println(valuesFinal.getKey() + " " + valuesFinal.getValue().getHtmlUrl());
277+
}
270278

271279
}
272280

src/main/java/com/francescodisalesdev/gitcli/utility/ErrorMessages.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public String toString() {
3636
{
3737
@Override
3838
public String toString() {
39-
return "Mail not setted";
39+
return "Mail not set";
4040
}
4141
}
4242
}

0 commit comments

Comments
 (0)