-
Notifications
You must be signed in to change notification settings - Fork 389
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
fix: gave prompt when/if content was empty #686
base: master
Are you sure you want to change the base?
fix: gave prompt when/if content was empty #686
Conversation
Shane-XB-Qian
commented
Feb 13, 2025
-
- should be nice for user experience
-
- helpful to judge when/if pipeline
0eb948e
to
7748b07
Compare
main.go
Outdated
@@ -299,6 +299,10 @@ func executeCLI(cmd *cobra.Command, src *source, w io.Writer) error { | |||
s = utils.WrapCodeBlock(string(b), ext) | |||
} | |||
|
|||
if s == "" { | |||
s = "[glow: empty content]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prob @meowgorithm has a better idea of text placeholder for this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, empty content maybe confused, better to have one, but whatever the prompt to be.
@@ -22,4 +22,4 @@ jobs: | |||
ruleguard: | |||
uses: charmbracelet/meta/.github/workflows/ruleguard.yml@main | |||
with: | |||
go-version: stable | |||
go-version: 1.23.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is because stable isn't yet 1.23.6?
or to lock the lint to the project version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure, but err like ruleguard: internal error: package "os" without types was imported from "github.com/charmbracelet/glow/v2/utils"
// refer err at https://github.com/Shane-XB-Qian/glow/actions/runs/13306014402/job/37157054515
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after your team update mod yesterday, seems ruleguard still failed (if with 'stable'), but/vs here specific 1.23.6 work.
df6dd98
to
5a2a06e
Compare
supposed i have found all places which should to add such prompt, pls check. |
* 1. should be nice for user experience * 2. helpful to judge when/if pipeline Signed-off-by: shane.xb.qian <[email protected]>
Signed-off-by: shane.xb.qian <[email protected]>
Signed-off-by: shane.xb.qian <[email protected]>
84c5108
to
94178d2
Compare