嗯,奇怪。 我似乎无法重现。 你能分享这个命令的输出吗?
noti --verbose -t "My Title" -m "My Message"
确定的事情:
$ noti --verbose -t "My Title" -m "My Message"
Failed to configure: failed to read config file: [open .noti.yaml: no such file or directory open /Users/tkc/.config/noti/noti.yaml: no such file or directory]
title: My Title
Running command: []
Services: map[banner:{}]
Viper: map[title:My Title say:map[voice:Alex] pushbullet:map[accesstoken:] bearychat:map[incominghookuri:] message:Done! simplepush:map[key: event:] slack:map[channel: username:noti token:] hipchat:map[room: accesstoken:] defaults:[banner] espeak:map[voicename:english-us] pushover:map[apitoken: userkey:] nsuser:map[soundnamefail:Basso soundname:Ping] pushsafer:map[key:] speechsynthesizer:map[voice:Microsoft David Desktop]]
1 notifications queued
Sent: *nsuser.Notification
如果您在运行 noti 时所在的文件夹中没有 .noti.yaml,它会忽略消息标志。
创建一个空的 .noti.yaml 文件可以解决问题,但仅限于该给定目录。
问题可能在这里:
https://github.com/variadico/noti/blob/960a214d7f2b2ef4866ac8f90048b65032c7c9bf/internal/command/config.go#L182 -L192
创建一个空文件~/.config/noti/noti.yaml
有效,谢谢@heidark。
哦哦,不错! 我现在绝对可以重现这个! 谢谢@heidark! 补丁发布即将推出!
谢谢大家!
我相信这应该在最新的dev上修复。
现在关闭。 补丁发布即将推出!
最有用的评论
如果您在运行 noti 时所在的文件夹中没有 .noti.yaml,它会忽略消息标志。
创建一个空的 .noti.yaml 文件可以解决问题,但仅限于该给定目录。
问题可能在这里:
https://github.com/variadico/noti/blob/960a214d7f2b2ef4866ac8f90048b65032c7c9bf/internal/command/config.go#L182 -L192