add detection for developement environment
This commit is contained in:
parent
c6eb4c8fdb
commit
e5abc4823d
|
@ -7,12 +7,18 @@ public class Bootstrapper {
|
|||
|
||||
public static void main(String[] args) throws URISyntaxException {
|
||||
|
||||
File jarFile =
|
||||
new File(Bootstrapper.class.getProtectionDomain().getCodeSource().getLocation().toURI());
|
||||
|
||||
File executionPath =
|
||||
new File(
|
||||
new File(Bootstrapper.class.getProtectionDomain().getCodeSource().getLocation().toURI())
|
||||
.getParent());
|
||||
|
||||
if (!jarFile.isFile()) System.out.println("Dev environment detected!");
|
||||
|
||||
CLIProcessor cliProcessor = new CLIProcessor();
|
||||
cliProcessor.startCLI(args, executionPath);
|
||||
cliProcessor.startCLI(
|
||||
args, jarFile.isFile() ? executionPath : new File(System.getProperty("user.dir")));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,7 +90,6 @@ public class CLIProcessor {
|
|||
return;
|
||||
}
|
||||
String fileName = args[1];
|
||||
System.out.println(executionPath.getAbsolutePath());
|
||||
File tasksFolder = new File(executionPath, "tasks");
|
||||
if (!tasksFolder.exists())
|
||||
if (!tasksFolder.mkdir()) System.err.println("Failed to create tasks folder!");
|
||||
|
|
|
@ -14,7 +14,6 @@ import java.text.SimpleDateFormat;
|
|||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Date;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
@Builder
|
||||
|
|
Loading…
Reference in New Issue
Block a user