Skip to content

Commit

Permalink
Fix issues with default path for notepad++ command
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislo27 committed Aug 21, 2019
1 parent 86d8251 commit f68dcd5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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")
}
}
}

0 comments on commit f68dcd5

Please sign in to comment.