0
0
mirror of https://github.com/tj/n.git synced 2024-11-21 18:48:57 +01:00

Lint: quote echoed variables

This commit is contained in:
John Gee 2020-06-24 20:46:35 +12:00
parent c9475fd328
commit 4358e91442

4
bin/n
View File

@ -826,8 +826,8 @@ function can_use_xz() {
return 0
elif [[ "${uname_s}" = "Darwin" ]]; then
local macos_version="$(sw_vers -productVersion)"
local macos_major_version="$(echo ${macos_version} | cut -d '.' -f 1)"
local macos_minor_version="$(echo ${macos_version} | cut -d '.' -f 2)"
local macos_major_version="$(echo "${macos_version}" | cut -d '.' -f 1)"
local macos_minor_version="$(echo "${macos_version}" | cut -d '.' -f 2)"
if [[ "${macos_major_version}" -gt 10 || "${macos_minor_version}" -gt 8 ]]; then
# tar on recent Darwin has xz support built-in
return 0