From 246957d5521ba06c6483b3acde156b6d8fc04c0d Mon Sep 17 00:00:00 2001 From: bobsayshilol Date: Tue, 7 Oct 2025 20:24:57 +0100 Subject: [PATCH] Add missing variable quoting All other uses of `json_file` are quoted, and not doing so here breaks the call to `cat` if the path has spaces in it. --- src/dotnet-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotnet-install.sh b/src/dotnet-install.sh index 0e195282e4..6180745eaf 100644 --- a/src/dotnet-install.sh +++ b/src/dotnet-install.sh @@ -661,7 +661,7 @@ parse_globaljson_file_for_version() { return 1 fi - sdk_section=$(cat $json_file | tr -d "\r" | awk '/"sdk"/,/}/') + sdk_section=$(cat "$json_file" | tr -d "\r" | awk '/"sdk"/,/}/') if [ -z "$sdk_section" ]; then say_err "Unable to parse the SDK node in \`$json_file\`" return 1