Skip to content

Commit ed642e6

Browse files
committed
feat: fix to resolve home directory path
1 parent 731a072 commit ed642e6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

handler/handler.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ func (sh *SessionHandler) readConfig() *config {
5353
}
5454

5555
func (sh *SessionHandler) parseConfig(configFile string) (*config, error) {
56-
file, err := os.Open(configFile)
56+
path, err := sh.expandPath(configFile)
57+
if err != nil {
58+
return nil, fmt.Errorf("failed to expand path: %w", err)
59+
}
60+
file, err := os.Open(path)
5761
if err != nil {
5862
return nil, fmt.Errorf("failed to open config file: %w", err)
5963
}

0 commit comments

Comments
 (0)