shim: get rid of insane launch condition
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
@@ -3,6 +3,7 @@ package shim
|
||||
import (
|
||||
"encoding/gob"
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
@@ -148,3 +149,13 @@ func receiveWLfd(conn *net.UnixConn) (int, error) {
|
||||
return fds[0], nil
|
||||
}
|
||||
}
|
||||
|
||||
// Try runs shim and stops execution if FORTIFY_SHIM is set.
|
||||
func Try() {
|
||||
if args := flag.Args(); len(args) == 1 && args[0] == "shim" {
|
||||
if s, ok := os.LookupEnv(EnvShim); ok {
|
||||
shim(s)
|
||||
panic("unreachable")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,11 +80,3 @@ func ServeConfig(socket string, payload *Payload, wl string, done chan struct{})
|
||||
return ws, nil
|
||||
}
|
||||
}
|
||||
|
||||
// Try runs shim and stops execution if FORTIFY_SHIM is set.
|
||||
func Try() {
|
||||
if s, ok := os.LookupEnv(EnvShim); ok {
|
||||
shim(s)
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user