Vérification si le Bakefile existe
This commit is contained in:
parent
2d7f69f02e
commit
98e84fcdf9
@ -16,6 +16,11 @@ public class BakefileParser {
|
||||
|
||||
public List<Target> parse() {
|
||||
List<Target> targets = new ArrayList<>();
|
||||
if (!Files.exists(Paths.get(filename))) {
|
||||
System.out.println("*** No targets specified and no makefile found. Stop.");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
try {
|
||||
List<String> lines = Files.readAllLines(Paths.get(filename));
|
||||
for (String line : lines) {
|
||||
@ -31,6 +36,6 @@ public class BakefileParser {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return targets;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
BIN
tests/test-02-existe-deja/main
Executable file
BIN
tests/test-02-existe-deja/main
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user