Fixed bug where the getDistroAsciiArt function would ignore the systemConfigDir variable
This commit is contained in:
parent
ce9813a2af
commit
0ed976a06e
8
utils.go
8
utils.go
@ -73,8 +73,8 @@ func getDistroAsciiArt() string {
|
|||||||
}
|
}
|
||||||
userConfDir, err := os.UserConfigDir()
|
userConfDir, err := os.UserConfigDir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if _, err := os.Stat(path.Join("/etc/stormfetch/ascii/", id)); err == nil {
|
if _, err := os.Stat(path.Join(systemConfigDir, "stormfetch/ascii/", id)); err == nil {
|
||||||
bytes, err := os.ReadFile(path.Join("/etc/stormfetch/ascii/", id))
|
bytes, err := os.ReadFile(path.Join(systemConfigDir, "stormfetch/ascii/", id))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return defaultAscii
|
return defaultAscii
|
||||||
}
|
}
|
||||||
@ -89,8 +89,8 @@ func getDistroAsciiArt() string {
|
|||||||
return defaultAscii
|
return defaultAscii
|
||||||
}
|
}
|
||||||
return string(bytes)
|
return string(bytes)
|
||||||
} else if _, err := os.Stat(path.Join("/etc/stormfetch/ascii/", id)); err == nil {
|
} else if _, err := os.Stat(path.Join(systemConfigDir, "stormfetch/ascii/", id)); err == nil {
|
||||||
bytes, err := os.ReadFile(path.Join("/etc/stormfetch/ascii/", id))
|
bytes, err := os.ReadFile(path.Join(systemConfigDir, "stormfetch/ascii/", id))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return defaultAscii
|
return defaultAscii
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user