Skip to content

Commit

Permalink
Update check_os.sh (#2469)
Browse files Browse the repository at this point in the history
On my RHEL system, ID is initially set to  'ID_LIKE="RHEL CENTOS FEDORA"', which, when expanded in the if-statement, turns into  this:
if [ -z ID_LIKE=RHEL CENTOS FEDORA ]; then and causes the error:
`souffle/sh/check_os.sh: line 15: [: too many arguments`

It is necessary to quote $ID
  • Loading branch information
strRM committed Feb 1, 2024
1 parent 42e432b commit dc8ecf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sh/check_os.sh
Expand Up @@ -11,7 +11,7 @@ fi
ID=$(grep -G "^ID_LIKE=" $file | tr a-z A-Z)

#Fedora is special and has no ID_LIKE
if [ -z $ID ]; then
if [ -z "$ID" ]; then
ID=$(grep -G "^ID=" $file | tr a-z A-Z)
fi

Expand Down

0 comments on commit dc8ecf8

Please sign in to comment.