mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Python path setting (#2409)
* Add python package * Add python path backend config * Add python path to system settings page * Apply python path to script scrapers and plugins
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
// Package exec provides functions that wrap os/exec functions. These functions prevent external commands from opening windows on the Windows platform.
|
||||
package exec
|
||||
|
||||
import "os/exec"
|
||||
import (
|
||||
"context"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
// Command wraps the exec.Command function, preventing Windows from opening a window when starting.
|
||||
func Command(name string, arg ...string) *exec.Cmd {
|
||||
@@ -9,3 +12,10 @@ func Command(name string, arg ...string) *exec.Cmd {
|
||||
hideExecShell(ret)
|
||||
return ret
|
||||
}
|
||||
|
||||
// CommandContext wraps the exec.CommandContext function, preventing Windows from opening a window when starting.
|
||||
func CommandContext(ctx context.Context, name string, arg ...string) *exec.Cmd {
|
||||
ret := exec.CommandContext(ctx, name, arg...)
|
||||
hideExecShell(ret)
|
||||
return ret
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user