Skip to content

Commit e971340

Browse files
authored
Merge pull request BruceEckel#15 from quidryan/strip-windows-newline
Remove ^M from fileroot
2 parents e09d39f + 3f0d825 commit e971340

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Tags {
2222
block = file.text
2323
hasMainMethod = block.contains('main(String[] args)')
2424
def firstLine = block.substring(0, block.indexOf("\n"))
25-
fileRoot = firstLine.split("/")[-1] - ".java"
25+
fileRoot = (firstLine.split("/")[-1] - ".java").trim() // Remove \r if it exists
2626
mainClass = fileRoot
2727
javaCmd = extract('java')
2828
if(javaCmd) {

0 commit comments

Comments
 (0)