Skip to content

Issues with Running lint.sh and format.sh #58

@aflah02

Description

@aflah02

I noticed that some tests for code formatting were failing in #50
Hence I tried to run format.sh however encountered this issue -

(kerasnlp) aflah@LAPTOP:/mnt/c/Users/ASUS/Desktop/keras-nlp$ bash shell/format.sh
shell/format.sh: line 2: $'\r': command not found
shell/format.sh: line 4: $'\r': command not found
Broken 1 paths
Usage: black [OPTIONS] SRC ...
Try 'black -h' for help.

Error: Invalid value for 'SRC ...': Path '.\r\r' does not exist.
shell/format.sh: line 7: $'\r': command not found
shell/format.sh: line 8: syntax error near unexpected token `$'do\r''
'hell/format.sh: line 8: `for i in $(find ${base_dir} -name '*.py'); do

same when I run lint.sh

(kerasnlp) aflah@LAPTOP:/mnt/c/Users/ASUS/Desktop/keras-nlp$ bash shell/lint.sh
shell/lint.sh: line 2: $'\r': command not found
shell/lint.sh: line 4: $'\r': command not found
Broken 1 paths
shell/lint.sh: line 20: syntax error near unexpected token `$'do\r''
'hell/lint.sh: line 20: `for i in $(find "${base_dir}" -name '*.py'); do

I'm running these in a conda env in WSL on Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions