1
0
mirror of https://github.com/TheLocehiliosan/yadm synced 2024-10-27 20:34:27 +00:00

Fix error when /proc/version is missing

This commit is contained in:
Tim Byrne 2020-02-03 08:30:50 -06:00
parent 45f1d93193
commit 79e93e38bc
No known key found for this signature in database
GPG Key ID: 14DB4FC2465A4B12

4
yadm
View File

@ -1535,7 +1535,9 @@ function configure_repo() {
function set_operating_system() { function set_operating_system() {
if [[ "$(<"$PROC_VERSION")" =~ [Mm]icrosoft ]]; then local proc_version
proc_version=$(cat "$PROC_VERSION" 2>/dev/null)
if [[ "$proc_version" =~ [Mm]icrosoft ]]; then
OPERATING_SYSTEM="WSL" OPERATING_SYSTEM="WSL"
else else
OPERATING_SYSTEM=$(uname -s) OPERATING_SYSTEM=$(uname -s)