Make generated files have SUDO_USER's permissions if possible.

This commit is contained in:
世界
2023-12-17 20:49:25 +08:00
parent ad93b8fba4
commit 7ed90384a1
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,