Refactor scripts to use command -v instead of which (#20306)
`which` is not a core package is some distributions. Included changes from #20309 Release Notes: - N/A
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ else
|
||||
fi
|
||||
|
||||
# Install sqlx-cli if needed
|
||||
if [[ "$(sqlx --version)" != "sqlx-cli 0.7.2" ]]; then
|
||||
if ! [[ "$(command -v sqlx)" && "$(sqlx --version)" == "sqlx-cli 0.7.2" ]]; then
|
||||
echo "sqlx-cli not found or not the required version, installing version 0.7.2..."
|
||||
cargo install sqlx-cli --version 0.7.2
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user