Noti: 消息设置不起作用

创建于 2018-01-24  ·  6评论  ·  资料来源: variadico/noti

描述

--message / -m标志未正确设置通知的消息字段。 无论指定什么,消息字段始终是字符串“完成!”。

重现步骤

noti -t "My Title" -m "My Message"

当配置文件丢失时会发生此行为。 正如@heidark 所指出的,一个空文件可以解决它。

预期行为

通知弹出窗口/语音朗读的消息字段为“我的消息”。

实际行为

消息字段保持默认字符串“完成!”。
screen shot 2018-01-24 at 4 17 07 pm

版本

3.0.0 ,通过 MacOs 10.13.2 上的 Homebrew 安装

screen shot 2018-01-24 at 4 17 13 pm

最有用的评论

如果您在运行 noti 时所在的文件夹中没有 .noti.yaml,它会忽略消息标志。

创建一个空的 .noti.yaml 文件可以解决问题,但仅限于该给定目录。

问题可能在这里:
https://github.com/variadico/noti/blob/960a214d7f2b2ef4866ac8f90048b65032c7c9bf/internal/command/config.go#L182 -L192

所有6条评论

嗯,奇怪。 我似乎无法重现。 你能分享这个命令的输出吗?

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上修复。

现在关闭。 补丁发布即将推出!

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

ilovezfs picture ilovezfs  ·  7评论

subvillion picture subvillion  ·  6评论

integrii picture integrii  ·  12评论

pascalandy picture pascalandy  ·  6评论

ventz picture ventz  ·  5评论