From 372f4fcd39dbdacb9dafc3db13269a164f9de624 Mon Sep 17 00:00:00 2001 From: Niall Crowe Date: Fri, 17 Nov 2023 11:44:42 +0000 Subject: [PATCH] specify 'dotnet-ef' version for tools-in-path With the release of .NET 8, the tools for .NET have also been updated for .NET 8. The new updated tools are incompatiable with .NET 6 and 7 meaning the correct tool version must be specified for the version of .NET installed on the machine. --- tools-in-path/test.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tools-in-path/test.sh b/tools-in-path/test.sh index d42388b..8372fb2 100755 --- a/tools-in-path/test.sh +++ b/tools-in-path/test.sh @@ -7,7 +7,7 @@ if [ -f /etc/profile ]; then fi set -euo pipefail - +IFS=$'\n\t' set -x echo "$PATH" @@ -19,10 +19,7 @@ else exit 1 fi -if dotnet tool list -g | grep -F dotnet-ef; then - true -else - dotnet tool install -g dotnet-ef || true -fi +IFS='.-' read -ra VERSION_SPLIT <<< "$1" +dotnet tool update -g dotnet-ef --version "${VERSION_SPLIT[0]}.*-*" dotnet ef --version