Closed gronka closed 4 months ago
I made some 2 changes recommended by @araglu. I think the variable name PREFIX
is a much better name, and using sed
with --unbuffered
makes new lines output immediately, which is a significantly better experience when working locallly with docker-compose.
Hey @gronka I just tested this locally and I'm seeing a lot of these errors and no helpful logging:
run.sh: line 2: $'\r': command not found
run.sh: line 3: syntax error near unexpected token `$'{\r''
run.sh: line 3: `tail_file() {
Looks like some carriage return characters are causing issues maybe?
Looks like some carriage return characters are causing issues maybe?
That was the problem I think. I opened the file in VSCode and it was show CRLF line endings. I changed it to LF, and it replaced all the line ending and is working now.
@swainn Thanks for figuring it out. I program in linux, so I don't know where an \r
could possibly come from. Maybe it had to do with rebasing after you updated my PR to main
, and then I tried to update my own branch to main
- you can see I ended up duplicating commit messages. I'm a bit lost on the process here, sorry.
I don't have CRLF in my files, so I'm not sure how to proceed. I just deleted my repo and cloned it, and I still don't see any CLRF.
Is this PR now a hidden branch in the tethysplatform repository?
I usually add * text=auto
to .gitattributes, which might be nice here (probably not with * in this repo).
I think I was able to check out this PR branch with git fetch origin pull/1066/head:fix-tail
. Is that correct? I still don't see any CRLF. dos2unix
doesn't seem to change the file
I don't have CRLF in my files, so I'm not sure how to proceed. I just deleted my repo and cloned it, and I still don't see any CLRF.
Hey I think I figured out what was going on. I built the Docker image for testing using Docker Desktop in Windows, so I bet the line endings go changed when I checked it out in windows. I just tested as-is in linux and it worked great. Sorry for the confusion.
Change the long-lived process from supervisord to tail, and prepend tail lines with the name of the file.
Description
Fixes this issue: https://github.com/tethysplatform/tethys/issues/1048
Changes Made to Code:
Related
Additional Notes
tail
errors to/dev/null
Quality Checks