Remove ^M from fileroot

This commit is contained in:
Justin Ryan 2016-08-01 23:05:22 -07:00
parent e09d39fd25
commit 3f0d825723

View File

@ -22,7 +22,7 @@ class Tags {
block = file.text
hasMainMethod = block.contains('main(String[] args)')
def firstLine = block.substring(0, block.indexOf("\n"))
fileRoot = firstLine.split("/")[-1] - ".java"
fileRoot = (firstLine.split("/")[-1] - ".java").trim() // Remove \r if it exists
mainClass = fileRoot
javaCmd = extract('java')
if(javaCmd) {