Closed kenorb closed 8 years ago
I've got the following code in my .travis.yml:
.travis.yml
before_cache: - [ -d ~/.wine ] && find ~/.wine/drive_c -type l -delete
however the syntax fails (travis lint), because of:
travis lint
[x] syntax error: (): did not find expected alphabetic or numeric character while scanning an anchor at line x column 20
This is a valid shell command, why this is limited only to alphabetic or numeric characters? Should this be fixed?
Currently the only workaround I see is to change it into test -d ~/.wine && ....
test -d ~/.wine && ...
Thanks for the report, @kenorb
This is indeed not valid YAML syntax. Try quoting the string like so:
before_cache: - "[ -d ~/.wine ] && find ~/.wine/drive_c -type l -delete"
You can always check the validity of your YAML online here
I've got the following code in my
.travis.yml
:however the syntax fails (
travis lint
), because of:This is a valid shell command, why this is limited only to alphabetic or numeric characters? Should this be fixed?
Currently the only workaround I see is to change it into
test -d ~/.wine && ...
.