mirror of
https://github.com/TheLocehiliosan/yadm
synced 2026-03-02 03:49:29 +00:00
Fix error when /proc/version is missing
This commit is contained in:
4
yadm
4
yadm
@@ -1535,7 +1535,9 @@ function configure_repo() {
|
||||
|
||||
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"
|
||||
else
|
||||
OPERATING_SYSTEM=$(uname -s)
|
||||
|
||||
Reference in New Issue
Block a user