Closed thoresuenert closed 6 years ago
@thoresuenert thank you for report, I'm able to reproduce the issue, will fix it shortly.
@beydogan let me know if i can help
This is due to unicode chars in result data from dokku-daemon. Git inside dokku clone prints string containing \e[1G
. And its breaking JSON.parse(...)
. I've spent more time than I should've on this and couldn't find a good way to catch all cases but to fix this one for now, I just removed \e[1G
from strings, so it should be fine. Let me know if you have any issues on this.
@beydoga When i use your daemon implementation in go, could that avoid this problem? Savant gave me a hint because bash and not bash
@thoresuenert no its the same with go daemon, im using that one.
Didnt last commit fix issue?
On Jan 30, 2018 6:11 PM, "thoresuenert" notifications@github.com wrote:
@beydoga When i use your daemon implementation in go, could that avoid this problem? Savant gave me a hint because bash and not bash
— You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/dokku/dokku-api/issues/10#issuecomment-361623069, or mute the thread https://github.com/notifications/unsubscribe-auth/ABr4CgOTtQljJFS8hponsdcElhGtRuUcks5tPzEGgaJpZM4RdndQ .
Not tried yet. Thanks for fixing it. Will test tomorrow.
When we send a
clone
command via API the response from unixsocket includes ansi/ascii escape sequences (ex.\x1b[1G
)When logged the results shows as:
we see it in postgres as:
i tried everything i can over the last two days to remove those chars.
i tried different ways of encode, scrub, gsub etc. but i cannot fix this problem.
PS: i found
socket.gets("\n")
gives the whole result at once, andsockets.gets('\n')
gives the result line by line.I don't know enough about ruby, string interpolation etc. to solve with problem. Any ideas?