mirror of
https://github.com/IlanCosman/tide.git
synced 2024-11-27 13:18:02 +03:00
Don't error if file doesn't have the specified key
This commit is contained in:
parent
4129099cd2
commit
9ceba3d423
10
blah
Normal file
10
blah
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
NAME="Garuda Linux"
|
||||||
|
PRETTY_NAME="Garuda Linux"
|
||||||
|
ID=garuda
|
||||||
|
BUILD_ID=rolling
|
||||||
|
ANSI_COLOR="38;2;23;147;209"
|
||||||
|
HOME_URL="https://garudalinux.org/"
|
||||||
|
DOCUMENTATION_URL="https://wiki.garudalinux.org/"
|
||||||
|
SUPPORT_URL="https://forum.garudalinux.org/"
|
||||||
|
BUG_REPORT_URL="https://gitlab.com/groups/garuda-linux/"
|
||||||
|
LOGO=garudalinux
|
@ -18,7 +18,8 @@ function _tide_detect_os_linux_cases -a file key
|
|||||||
test -f $file || return
|
test -f $file || return
|
||||||
|
|
||||||
set -l splitOsRelease (cat $file | string split '=')
|
set -l splitOsRelease (cat $file | string split '=')
|
||||||
set -l value $splitOsRelease[(math (contains --index $key $splitOsRelease)+1)]
|
set -l keyIndex (contains --index $key $splitOsRelease) || return
|
||||||
|
set -l value $splitOsRelease[(math $keyIndex + 1)]
|
||||||
set -l name (string trim --chars='"' $value | string lower)
|
set -l name (string trim --chars='"' $value | string lower)
|
||||||
|
|
||||||
switch $name
|
switch $name
|
||||||
|
Loading…
Reference in New Issue
Block a user