From f68dcd5a761afbfe1097e087ed3576680c8273a2 Mon Sep 17 00:00:00 2001 From: chrislo27 Date: Tue, 20 Aug 2019 17:05:06 -0700 Subject: [PATCH] Fix issues with default path for notepad++ command --- .../kotlin/rhmodding/tickompiler/cli/NotepadppLangCommand.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/rhmodding/tickompiler/cli/NotepadppLangCommand.kt b/src/main/kotlin/rhmodding/tickompiler/cli/NotepadppLangCommand.kt index 5af99b1..2e7af84 100644 --- a/src/main/kotlin/rhmodding/tickompiler/cli/NotepadppLangCommand.kt +++ b/src/main/kotlin/rhmodding/tickompiler/cli/NotepadppLangCommand.kt @@ -14,7 +14,7 @@ class NotepadppLangCommand : Runnable { var overwrite: Boolean = false @CommandLine.Parameters(index = "0", arity = "0..1", description = ["output file or directory"]) - var output: File = File("") + var output: File = File("./") override fun run() { output.mkdirs() @@ -23,8 +23,9 @@ class NotepadppLangCommand : Runnable { println("Cannot output ${file.name}, already exists in the target directory (${file.parentFile.absolutePath}). Please move, rename, or delete the file first.") } else { val internal = NotepadppLangCommand::class.java.getResource("/notepadplusplustickflowlang.xml") + file.createNewFile() file.writeBytes(internal.readBytes()) - println("Outputted ${file.name} to ${file.parentFile.absolutePath}. Import it into Notepad++ via: Language > Define your language... > Import") + println("Outputted ${file.name} to ${file.parentFile.canonicalPath}\nImport it into Notepad++ via: Language > Define your language... > Import") } } } \ No newline at end of file