use stderr instead of a control socket with pluginHost

This commit is contained in:
Zoe
2025-05-20 14:01:06 +00:00
parent 2d385bc91f
commit 8901340859
2 changed files with 12 additions and 28 deletions

View File

@@ -19,12 +19,15 @@ var controlPath string
func init() {
if len(os.Args) < 3 {
fmt.Fprintf(os.Stderr, "Usage: pluginHost <pluginPath> <socketPath>")
fmt.Fprintf(os.Stderr, "Usage: pluginHost <pluginPath> <socketPath> [controlPath]")
os.Exit(1)
}
pluginPath = os.Args[1]
socketPath = os.Args[2]
// Idk why I originally wrote this solution when stderr is literally just the best solution for me, but this
// makes the pluginHost more generally useful outside of GLoom, so I'm keeping it
// TODO: maybe make it a compiler flag, though I'm sure its not making the binary *that* much bigger
if len(os.Args) > 3 {
controlPath = os.Args[3]
}