Skip to content

Commit 92f102d

Browse files
committed
chore: sugar
1 parent 68b2bd1 commit 92f102d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/fsutils/basepath.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package fsutils
22

33
import (
44
"bytes"
5+
"cmp"
56
"context"
67
"errors"
78
"fmt"
@@ -24,9 +25,7 @@ func AllRelativePathModes() []string {
2425
}
2526

2627
func GetBasePath(ctx context.Context, mode, cfgDir string) (string, error) {
27-
if mode == "" {
28-
mode = RelativePathModeCfg
29-
}
28+
mode = cmp.Or(mode, RelativePathModeCfg)
3029

3130
switch mode {
3231
case RelativePathModeCfg:

0 commit comments

Comments
 (0)