-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(#118): improve error message for --execute
#119
base: main
Are you sure you want to change the base?
feat(#118): improve error message for --execute
#119
Conversation
Hey @AlejandroSuero thank you so much for this contribution! Do you know why the full error message isn't displayed at the moment? This example output looks a bit rough That said, I didn't reproduce the garbled output, so looks good?? Let me know if I'm missing anything :) |
@bashbunni The code I committed has the version where it prints the first line of the error, because I ran into the problem with the garbled output. I tested printing out to the terminal with Maybe the error is in the way lipgloss is rendering it, I will look into it and comeback. |
@bashbunni as I thought, the problem is the way lipgloss is rendering it. I'm kinda new to lipgloss so I don't know the specifics, but it seems that is calling I arrived to the solution of splitting the string and rendering it line by line like: Which results in the following output: Do you want me to commit it or is there a better way to achieve this with lipgloss? |
Co-authored-by: ccoVeille <[email protected]>
Also prints new line after error status.
Co-authored-by: ccoVeille <[email protected]>
Sorry for the delay here, but I want to spend more time with that underlying issue in Lip Gloss before merging this. Ideally we can include the entire error message here with Lip Gloss styling 🙏 |
Hey update on this. I'm working to debug this in Lip Gloss and while I can reproduce the issue, for some reason the output is wrong, but the string even provided to This is the result of I'm working on this branch to debug this issue: https://github.com/charmbracelet/freeze/tree/bunni-improve-error-msg I have a branch where the output formats correctly, but the solution is too hacky for my liking. I'd rather figure out why this is happening in Lip Gloss. fdcd0de To debug in my debugger I'm running {
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
// dlv debug --headless --api-version=2 --listen=127.0.0.1:43000 . -- -x "git defer" -c full
"version": "0.2.0",
"configurations": [
{
"name": "Connect to server",
"type": "go",
"request": "attach",
"mode": "remote",
"remotePath": "${workspaceFolder}",
"port": 43000,
"host": "127.0.0.1"
}
]
} |
the issue is fixed when I comment out line 65 ( |
Found the issue in Lip Gloss, have an open PR. Will take another look at this once that's merged charmbracelet/lipgloss#386 |
Thanks @bashbunni as I said on the Discord, I was a bit busy with take homes and got the job and started the next day after telling me that I got it 😄 , and now with all the onboarding and catching up, couldn't debug it myself. Good job finding the error 👍 |
@AlejandroSuero no problem at all, you've already helped us lots with this PR + highlighting this issue in the first place. I hope the new gig is treating you well! |
With these changes, the error messages will show error that occurred. Closes #118.
Note
As you can see, it only shows the first line of the message.
Possible improvements:
$ git defer git: 'defer' is not a git command. See 'git --help'. The most similar commands are rerere revert