1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-13 08:03:17 +02:00
This commit is contained in:
Philipp Heckel 2022-06-01 16:57:35 -04:00
parent bd865fd55d
commit ab955d4d1c
15 changed files with 161 additions and 65 deletions

View file

@ -43,7 +43,7 @@ var cmdSubscribe = &cli.Command{
Action: execSubscribe,
Category: categoryClient,
Flags: flagsSubscribe,
Before: initLogFunc(nil),
Before: initLogFunc,
Description: `Subscribe to a topic from a ntfy server, and either print or execute a command for
every arriving message. There are 3 modes in which the command can be run:
@ -253,7 +253,7 @@ func loadConfig(c *cli.Context) (*client.Config, error) {
if filename != "" {
return client.LoadConfig(filename)
}
configFile := defaultConfigFile()
configFile := defaultClientConfigFile()
if s, _ := os.Stat(configFile); s != nil {
return client.LoadConfig(configFile)
}
@ -261,7 +261,7 @@ func loadConfig(c *cli.Context) (*client.Config, error) {
}
//lint:ignore U1000 Conditionally used in different builds
func defaultConfigFileUnix() string {
func defaultClientConfigFileUnix() string {
u, _ := user.Current()
configFile := clientRootConfigFileUnixAbsolute
if u.Uid != "0" {
@ -272,7 +272,7 @@ func defaultConfigFileUnix() string {
}
//lint:ignore U1000 Conditionally used in different builds
func defaultConfigFileWindows() string {
func defaultClientConfigFileWindows() string {
homeDir, _ := os.UserConfigDir()
return filepath.Join(homeDir, clientUserConfigFileWindowsRelative)
}