Make generated files have SUDO_USER's permissions if possible.

This commit is contained in:
世界
2023-12-17 20:49:25 +08:00
parent 6ddcd3954d
commit 35fd9de3ff
2 changed files with 22 additions and 3 deletions

View File

@@ -133,7 +133,7 @@ func create() (*box.Box, context.CancelFunc, error) {
}
options.Log.DisableColor = true
}
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithCancel(globalCtx)
instance, err := box.New(box.Options{
Context: ctx,
Options: options,