File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
main/java/dev/streamx/cli
test/java/dev/streamx/cli Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 11package dev .streamx .cli ;
22
33import java .io .File ;
4+ import java .nio .file .Path ;
45import java .util .regex .Pattern ;
56import java .util .stream .Stream ;
67
@@ -39,7 +40,10 @@ private String findStreamxJar() {
3940 .filter (File ::exists )
4041 .map (File ::listFiles )
4142 .flatMap (Stream ::of )
42- .map (File ::getAbsolutePath )
43+ .map (File ::toPath )
44+ .map (Path ::toAbsolutePath )
45+ .map (Path ::normalize )
46+ .map (Path ::toString )
4347 .filter (p -> pattern .matcher (p .replace ("\\ " , "/" )).matches ())
4448 .findFirst ()
4549 .orElseThrow (() -> new RuntimeException ("Could not find streamx Jar" ));
Original file line number Diff line number Diff line change @@ -25,14 +25,14 @@ public OsTerminalCommandRunner() {
2525 }
2626
2727 public ShellProcess run (String command ) {
28- logger .info ("Running terminal command: " + command );
2928 ProcessBuilder processBuilder = osCommand .create (command );
3029 try {
3130 ShellProcess shellProcess = ShellProcess .run (processBuilder );
3231 logger .info ("Terminal command: '" + command + "' started" );
3332 processes .add (shellProcess );
3433 return shellProcess ;
3534 } catch (IOException e ) {
35+ logger .info ("Error running terminal command: " + command );
3636 throw new RuntimeException (e );
3737 }
3838 }
Original file line number Diff line number Diff line change 1414import java .nio .file .Path ;
1515import java .time .Duration ;
1616import org .eclipse .microprofile .config .inject .ConfigProperty ;
17- import org .jetbrains .annotations .NotNull ;
1817import org .junit .jupiter .api .BeforeAll ;
1918import org .junit .jupiter .api .Test ;
2019import org .junit .jupiter .api .TestInstance ;
You can’t perform that action at this time.
0 commit comments