Skip to content

Commit 8aa77d1

Browse files
authored
Add missing variable quoting (#644)
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.
1 parent 28bc529 commit 8aa77d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotnet-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ parse_globaljson_file_for_version() {
661661
return 1
662662
fi
663663

664-
sdk_section=$(cat $json_file | tr -d "\r" | awk '/"sdk"/,/}/')
664+
sdk_section=$(cat "$json_file" | tr -d "\r" | awk '/"sdk"/,/}/')
665665
if [ -z "$sdk_section" ]; then
666666
say_err "Unable to parse the SDK node in \`$json_file\`"
667667
return 1

0 commit comments

Comments
 (0)