File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,10 @@ func main() {
198198
199199 if c .Bool ("background" ) {
200200 log .Warn ("exec-env's --background option is deprecated and will be removed in a future version of sops" )
201+
202+ if c .Bool ("same-process" ) {
203+ return common .NewExitError ("Error: The --same-process flag cannot be used with --background" , codes .ErrorConflictingParameters )
204+ }
201205 }
202206
203207 tree , err := decryptTree (opts )
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package exec
22
33import (
44 "bytes"
5+ "fmt"
56 "os"
67 "path/filepath"
78 "runtime"
@@ -116,6 +117,10 @@ func ExecWithEnv(opts ExecOpts) error {
116117 SwitchUser (opts .User )
117118 }
118119
120+ if runtime .GOOS == "windows" && opts .SameProcess {
121+ return fmt .Errorf ("The --same-process flag is not supported on Windows" )
122+ }
123+
119124 var env []string
120125
121126 if ! opts .Pristine {
You can’t perform that action at this time.
0 commit comments