changed function to work with windows only for now
This commit is contained in:
parent
e1160e3650
commit
ae981ad60e
Binary file not shown.
|
@ -4,9 +4,9 @@
|
|||
"description": "This plugin serves as a starting point for writing a Mattermost plugin.",
|
||||
"homepage_url": "https://gitlab.peanutsmediaserver.com/aaron/gameStatusUpdate",
|
||||
"support_url": "https://gitlab.peanutsmediaserver.com/aaron/gameStatusUpdate/issues",
|
||||
"release_notes_url": "https://gitlab.peanutsmediaserver.com/aaron/gameStatusUpdatereleases/tag/v0.1.0",
|
||||
"release_notes_url": "https://gitlab.peanutsmediaserver.com/aaron/gameStatusUpdatereleases/tag/v0.1.1",
|
||||
"icon_path": "assets/starter-template-icon.svg",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"min_server_version": "6.2.1",
|
||||
"server": {
|
||||
"executables": {
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -18,9 +18,9 @@ const manifestStr = `
|
|||
"description": "This plugin serves as a starting point for writing a Mattermost plugin.",
|
||||
"homepage_url": "https://gitlab.peanutsmediaserver.com/aaron/gameStatusUpdate",
|
||||
"support_url": "https://gitlab.peanutsmediaserver.com/aaron/gameStatusUpdate/issues",
|
||||
"release_notes_url": "https://gitlab.peanutsmediaserver.com/aaron/gameStatusUpdatereleases/tag/v0.1.0",
|
||||
"release_notes_url": "https://gitlab.peanutsmediaserver.com/aaron/gameStatusUpdatereleases/tag/v0.1.1",
|
||||
"icon_path": "assets/starter-template-icon.svg",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"min_server_version": "6.2.1",
|
||||
"server": {
|
||||
"executables": {
|
||||
|
|
|
@ -4,7 +4,6 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
@ -37,16 +36,8 @@ var knownGames = map[string]bool{
|
|||
|
||||
// GetActiveGame scans processes to determine the active game based on known game names
|
||||
func (p *Plugin) GetActiveGame() (string, error) {
|
||||
var cmd *exec.Cmd
|
||||
|
||||
// Check the operating system and execute the appropriate command
|
||||
if runtime.GOOS == "windows" {
|
||||
// For Windows, use tasklist command to get the list of processes
|
||||
cmd = exec.Command("tasklist")
|
||||
} else {
|
||||
// For Linux/macOS, use ps -e command to get the list of processes
|
||||
cmd = exec.Command("ps", "-e")
|
||||
}
|
||||
cmd := exec.Command("tasklist")
|
||||
|
||||
output, err := cmd.Output()
|
||||
if err != nil {
|
||||
|
|
2
webapp/dist/main.js
vendored
2
webapp/dist/main.js
vendored
File diff suppressed because one or more lines are too long
|
@ -7,9 +7,9 @@ const manifest = JSON.parse(`
|
|||
"description": "This plugin serves as a starting point for writing a Mattermost plugin.",
|
||||
"homepage_url": "https://gitlab.peanutsmediaserver.com/aaron/gameStatusUpdate",
|
||||
"support_url": "https://gitlab.peanutsmediaserver.com/aaron/gameStatusUpdate/issues",
|
||||
"release_notes_url": "https://gitlab.peanutsmediaserver.com/aaron/gameStatusUpdatereleases/tag/v0.1.0",
|
||||
"release_notes_url": "https://gitlab.peanutsmediaserver.com/aaron/gameStatusUpdatereleases/tag/v0.1.1",
|
||||
"icon_path": "assets/starter-template-icon.svg",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"min_server_version": "6.2.1",
|
||||
"server": {
|
||||
"executables": {
|
||||
|
|
Loading…
Reference in a new issue