From 21eb99a37e1cf69505dc31be0d54a01266995b03 Mon Sep 17 00:00:00 2001 From: xjasonlyu Date: Fri, 1 Apr 2022 14:28:12 +0800 Subject: [PATCH] Fix: should apply default option firstly --- core/stack.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/stack.go b/core/stack.go index 7edc757..c8beeda 100644 --- a/core/stack.go +++ b/core/stack.go @@ -38,9 +38,9 @@ func CreateStack(cfg *Config) (*stack.Stack, error) { cfg.PrintFunc = func(string, ...any) {} } - opts := cfg.Options - if len(opts) == 0 { - opts = []option.Option{option.WithDefault()} + opts := []option.Option{option.WithDefault()} + if len(opts) > 0 { + opts = append(opts, cfg.Options...) } s := stack.New(stack.Options{