Skip to content

Commit ad0bed2

Browse files
author
Chris Maunder
committed
setup bugs when dealing with .NET
1 parent 8e8d424 commit ad0bed2

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

src/scripts/utils.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ function quit () {
2929
}
3030

3131
# Returns a color code for the given foreground/background colors
32-
# This code is echoed to the terminal before outputing text in
32+
# This code is echoed to the terminal before outputting text in
3333
# order to generate a colored output.
3434
#
3535
# string foreground color name. Optional if no background provided.
3636
# Defaults to "Default" which uses the system default
3737
# string background color name. Optional. Defaults to "Default"
3838
# which is the system default
39-
# string intense. Optional. If "true" then the insensity is turned up
39+
# string intense. Optional. If "true" then the intensity is turned up
4040
# returns a string
4141
function Color () {
4242

@@ -566,7 +566,7 @@ function getDotNetVersion() {
566566
# IFS=$'\n' # set the Internal Field Separator as end of line
567567
# while read -r line
568568
# do
569-
# dotnet_version=$(echo "$line}" | cut -d ' ' -f 1)
569+
# dotnet_version=$(echo "${line}" | cut -d ' ' -f 1)
570570
# current_comparison=$(versionCompare $dotnet_version $highestDotNetVersion)
571571
#
572572
# if (( $current_comparison > $comparison )); then
@@ -588,7 +588,7 @@ function getDotNetVersion() {
588588
while read -r line
589589
do
590590
if [[ ${line} == *'Microsoft.NETCore.App '* ]]; then
591-
dotnet_version=$(echo "$line}" | cut -d ' ' -f 2)
591+
dotnet_version=$(echo "${line}" | cut -d ' ' -f 2)
592592
# echo "GET: Found .NET runtime $dotnet_version" >&3
593593

594594
current_comparison=$(versionCompare $dotnet_version $highestDotNetVersion)
@@ -633,7 +633,7 @@ function setupDotNet () {
633633

634634
if [ "$requestedType" = "" ]; then requestedType="aspnetcore"; fi
635635

636-
write "Checking for .NET ${requestedNetVersion}..."
636+
write "Checking for .NET ${requestedNetVersion} ${requestedType}..."
637637

638638
highestDotNetVersion="(None)"
639639
comparison=-1
@@ -648,8 +648,10 @@ function setupDotNet () {
648648
IFS=$'\n' # set the Internal Field Separator as end of line
649649
while read -r line
650650
do
651-
dotnet_version=$(echo "$line}" | cut -d ' ' -f 1)
652-
dotnet_major_version=$(echo "$dotnet_version}" | cut -d '.' -f 1)
651+
# echo "SET: Read line $line" >&3
652+
653+
dotnet_version=$(echo "${line}" | cut -d ' ' -f 1)
654+
dotnet_major_version=$(echo "${dotnet_version}" | cut -d '.' -f 1)
653655

654656
# echo "SET: Found .NET SDK $dotnet_version" >&3
655657

@@ -684,8 +686,8 @@ function setupDotNet () {
684686
do
685687
if [[ ${line} == *'Microsoft.NETCore.App '* ]]; then
686688

687-
dotnet_version=$(echo "$line}" | cut -d ' ' -f 2)
688-
dotnet_major_version=$(echo "$dotnet_version}" | cut -d '.' -f 1)
689+
dotnet_version=$(echo "${line}" | cut -d ' ' -f 2)
690+
dotnet_major_version=$(echo "${dotnet_version}" | cut -d '.' -f 1)
689691
# echo "SET: Found .NET runtime $dotnet_version" >&3
690692

691693
# Let's only compare major versions

src/setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ function doModuleInstall () {
417417
if [ "$moduleName" = "" ]; then moduleName="$moduleId"; fi
418418

419419
# writeLine
420-
writeLine "Processing module ${moduleId} ${moduleVersion}" "White" "Blue" $lineWidth
420+
writeLine "Processing module ${moduleId} ${moduleVersion} (${moduleType})" "White" "Blue" $lineWidth
421421
writeLine
422422

423423
# Convert brackets, quotes, commas and newlines to spaces
@@ -507,7 +507,7 @@ function doModuleInstall () {
507507
writeLine "moduleStartFilePath = $moduleStartFilePath" $color_info
508508
fi
509509

510-
writeLine "${moduleType} module install" "$color_mute"
510+
# writeLine "${moduleType} module install" "$color_mute"
511511

512512
if [ -f "${moduleDirPath}/install.sh" ]; then
513513

0 commit comments

Comments
 (0)