Skip to content

Commit

Permalink
Launcher: Updated launcher-common module to run an arbitrary command.
Browse files Browse the repository at this point in the history
  • Loading branch information
luskaner committed Aug 14, 2024
1 parent ac29795 commit 7630138
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions launcher-common/executor/command.go
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
package executor

import "golang.org/x/sys/windows"

func RunCommand(cmd []string) (err error) {
var args []string
if len(cmd) > 1 {
args = cmd[1:]
}
result := ExecOptions{
File: cmd[0],
WindowState: windows.SW_NORMAL,
SpecialFile: true,
Shell: true,
UseWorkingPath: true,
Args: args,
}.Exec()
err = result.Err
return
}

0 comments on commit 7630138

Please sign in to comment.