Skip to content

Commit

Permalink
fix: support abs path on config flag
Browse files Browse the repository at this point in the history
  • Loading branch information
sisisin committed Jan 20, 2023
1 parent 8de6ec8 commit 06ae14a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ func validConfigPathOrExit(configPathFromArg string) string {

return configFile
} else {
configFile := filepath.Join(wd, configPathFromArg)
configFile := ""
if path.IsAbs(configPathFromArg) {
configFile = configPathFromArg
} else {
configFile = filepath.Join(wd, configPathFromArg)
}
if fileExists(configFile) {
return configFile
}
Expand Down

0 comments on commit 06ae14a

Please sign in to comment.