mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
Add snoretoast run command
This commit is contained in:
parent
27bb5fbeb0
commit
50afb96de4
1 changed files with 38 additions and 0 deletions
38
pmctl/snoretoast_windows.go
Normal file
38
pmctl/snoretoast_windows.go
Normal file
|
@ -0,0 +1,38 @@
|
|||
package main
|
||||
|
||||
import "github.com/spf13/cobra"
|
||||
|
||||
func init() {
|
||||
showCmd.AddCommand(showSnoreToast)
|
||||
runCmd.AddCommand(runSnoreToast)
|
||||
}
|
||||
|
||||
var showSnoreToast = &cobra.Command{
|
||||
Use: "notifier-snoretoast",
|
||||
Short: "Show command to run the Notifier component SnoreToast",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return show(cmd, &Options{
|
||||
Identifier: "notifier/portmaster-snoretoast.exe",
|
||||
})
|
||||
},
|
||||
FParseErrWhitelist: cobra.FParseErrWhitelist{
|
||||
// UnknownFlags will ignore unknown flags errors and continue parsing rest of the flags
|
||||
UnknownFlags: true,
|
||||
},
|
||||
}
|
||||
|
||||
var runSnoreToast = &cobra.Command{
|
||||
Use: "notifier-snoretoast",
|
||||
Short: "Run the Notifier component SnoreToast",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return handleRun(cmd, &Options{
|
||||
Identifier: "notifier/portmaster-snoretoast.exe",
|
||||
AllowDownload: false,
|
||||
AllowHidingWindow: true,
|
||||
})
|
||||
},
|
||||
FParseErrWhitelist: cobra.FParseErrWhitelist{
|
||||
// UnknownFlags will ignore unknown flags errors and continue parsing rest of the flags
|
||||
UnknownFlags: true,
|
||||
},
|
||||
}
|
Loading…
Add table
Reference in a new issue