Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle : gradlew expecting in

Tags:

gradle

gradlew

i am facing this issue

sparsh610@DESKTOP-551C51M:/mnt/e/xxxxxxxxx$ ./gradlew mm
: not found2: ./gradlew:
: not found8: ./gradlew:
./gradlew: 52: ./gradlew: Syntax error: word unexpected (expecting "in")

i verified that my system has gradle installed and with all the read write access.

any specific reason for this error ?

Already checked this link

like image 975
sparsh610 Avatar asked Mar 25 '19 16:03

sparsh610


1 Answers

Its simply a difference between UNIX and windows handling end of line character, so easy to solve just type sed -i.bak 's/\r$//' gradlew this will replace the carriage return. With the option -i, the file will be edited in-place, and the original file will be backed up as gradlew.bak

like image 61
kusiroll Avatar answered Oct 11 '22 13:10

kusiroll