From fc34e6619a5904265eff21fa052a37a7d35ca054 Mon Sep 17 00:00:00 2001 From: fahad-israr Date: Sun, 28 Mar 2021 19:19:03 +0530 Subject: [PATCH] updated exception and output consoles --- cli/installer/windows/installer/fgit/fgit.cmd | 2 +- cli/src/main/java/dev/fgit/fgit.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/installer/windows/installer/fgit/fgit.cmd b/cli/installer/windows/installer/fgit/fgit.cmd index 31398f6..6209879 100644 --- a/cli/installer/windows/installer/fgit/fgit.cmd +++ b/cli/installer/windows/installer/fgit/fgit.cmd @@ -1,3 +1,3 @@ @echo off -cd "C:\Users\Public\fgit" +cd "%programfiles%\fgit" fgit.exe %1 \ No newline at end of file diff --git a/cli/src/main/java/dev/fgit/fgit.java b/cli/src/main/java/dev/fgit/fgit.java index 349033b..0c3ec4b 100644 --- a/cli/src/main/java/dev/fgit/fgit.java +++ b/cli/src/main/java/dev/fgit/fgit.java @@ -143,8 +143,8 @@ public static Process process_runner(Path directory, String... command)throws IO public static String gobbleStream(Process p) throws IOException, InterruptedException{ - StreamGobbler errorGobbler = new StreamGobbler(p.getErrorStream(), "E"); - StreamGobbler outputGobbler = new StreamGobbler(p.getInputStream(), "O"); + StreamGobbler errorGobbler = new StreamGobbler(p.getErrorStream(), ">> "); //For Error Stream + StreamGobbler outputGobbler = new StreamGobbler(p.getInputStream(), " "); // For Output Stream outputGobbler.start(); errorGobbler.start(); int exit = p.waitFor(); @@ -192,7 +192,7 @@ public void run() { String line; while ((line = br.readLine()) != null) { - System.out.println(type + "> " + line); + System.out.println(type + line); exec_result+=line; } } catch (IOException ioe) {