Skip to content

Commit

Permalink
specify 'dotnet-ef' version for tools-in-path (#319)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nicrowe00 authored Nov 17, 2023
1 parent aa9cb6f commit d3d39e7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tools-in-path/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [ -f /etc/profile ]; then
fi

set -euo pipefail

IFS=$'\n\t'
set -x

echo "$PATH"
Expand All @@ -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

0 comments on commit d3d39e7

Please sign in to comment.