mirror of
https://github.com/KarolS/millfork.git
synced 2025-04-06 20:37:12 +00:00
Allow omitting the .exe for the -r parameter
This commit is contained in:
parent
ea04b1f6c0
commit
a9aac4fca3
@ -167,8 +167,14 @@ object Main {
|
||||
}
|
||||
errorReporting.debug(s"Total time: ${Math.round((System.nanoTime() - startTime)/1e6)} ms")
|
||||
c.runFileName.foreach{ program =>
|
||||
if (!new File(program).exists()) {
|
||||
errorReporting.error(s"Program $program does not exist")
|
||||
if (File.separatorChar == '\\') {
|
||||
if (!new File(program).exists() && !new File(program + ".exe").exists()) {
|
||||
errorReporting.error(s"Program $program does not exist")
|
||||
}
|
||||
} else {
|
||||
if (!new File(program).exists()) {
|
||||
errorReporting.error(s"Program $program does not exist")
|
||||
}
|
||||
}
|
||||
val outputAbsolutePath = Paths.get(defaultPrgOutput).toAbsolutePath.toString
|
||||
val isBatch = File.separatorChar == '\\' && program.toLowerCase(Locale.ROOT).endsWith(".bat")
|
||||
|
Loading…
x
Reference in New Issue
Block a user