@@ -618,6 +618,11 @@ downloadcurl() {
618618 local remote_path=" $1 "
619619 local out_path=" ${2:- } "
620620
621+ # Append feed_credential as late as possible before calling curl to avoid logging feed_credential
622+ if [[ " $remote_path " == " $azure_feed " * ]] || [[ " $remote_path " == " $uncached_feed " * ]]; then
623+ remote_path=" ${remote_path}${feed_credential} "
624+ fi
625+
621626 local failed=false
622627 if [ -z " $out_path " ]; then
623628 curl --retry 10 -sSL -f --create-dirs " $remote_path " || failed=true
@@ -636,6 +641,11 @@ downloadwget() {
636641 local remote_path=" $1 "
637642 local out_path=" ${2:- } "
638643
644+ # Append feed_credential as late as possible before calling wget to avoid logging feed_credential
645+ if [[ " $remote_path " == " $azure_feed " * ]] || [[ " $remote_path " == " $uncached_feed " * ]]; then
646+ remote_path=" ${remote_path}${feed_credential} "
647+ fi
648+
639649 local failed=false
640650 if [ -z " $out_path " ]; then
641651 wget -q --tries 10 -O - " $remote_path " || failed=true
@@ -725,6 +735,7 @@ dry_run=false
725735no_path=false
726736azure_feed=" https://dotnetcli.azureedge.net/dotnet"
727737uncached_feed=" https://dotnetcli.blob.core.windows.net/dotnet"
738+ feed_credential=" "
728739verbose=false
729740shared_runtime=false
730741runtime_id=" "
770781 shift
771782 uncached_feed=" $1 "
772783 ;;
784+ --feed-credential|-[Ff]eed[Cc]redential)
785+ shift
786+ feed_credential=" $1 "
787+ ;;
773788 --runtime-id|-[Rr]untime[Ii]d)
774789 shift
775790 runtime_id=" $1 "
804819 echo " coherent applies only to SDK downloads"
805820 echo " - 3-part version in a format A.B.C - represents specific version of build"
806821 echo " examples: 2.0.0-preview2-006120; 1.1.0"
807- echo " -i,--install-dir <DIR> Install under specified location (see Install Location below)"
822+ echo " -i,--install-dir <DIR> Install under specified location (see Install Location below)"
808823 echo " -InstallDir"
809- echo " --architecture <ARCHITECTURE> Architecture of .NET Tools. Currently only x64 is supported."
824+ echo " --architecture <ARCHITECTURE> Architecture of .NET Tools. Currently only x64 is supported."
810825 echo " --arch,-Architecture,-Arch"
811- echo " --shared-runtime Installs just the shared runtime bits, not the entire SDK."
826+ echo " --shared-runtime Installs just the shared runtime bits, not the entire SDK."
812827 echo " -SharedRuntime"
813- echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable."
828+ echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable."
814829 echo " -SkipNonVersionedFiles"
815- echo " --dry-run,-DryRun Do not perform installation. Display download link."
816- echo " --no-path, -NoPath Do not set PATH for the current process."
817- echo " --verbose,-Verbose Display diagnostics information."
818- echo " --azure-feed,-AzureFeed Azure feed location. Defaults to $azure_feed , This parameter typically is not changed by the user."
819- echo " --uncached-feed,-UncachedFeed Uncached feed location. This parameter typically is not changed by the user."
820- echo " --runtime-id Installs the .NET Tools for the given platform (use linux-x64 for portable linux)."
830+ echo " --dry-run,-DryRun Do not perform installation. Display download link."
831+ echo " --no-path, -NoPath Do not set PATH for the current process."
832+ echo " --verbose,-Verbose Display diagnostics information."
833+ echo " --azure-feed,-AzureFeed Azure feed location. Defaults to $azure_feed , This parameter typically is not changed by the user."
834+ echo " --uncached-feed,-UncachedFeed Uncached feed location. This parameter typically is not changed by the user."
835+ echo " --feed-credential,-FeedCredential Azure feed shared access token. This parameter typically is not specified."
836+ echo " --runtime-id Installs the .NET Tools for the given platform (use linux-x64 for portable linux)."
821837 echo " -RuntimeId"
822- echo " -?,--?,-h,--help,-Help Shows this help message"
838+ echo " -?,--?,-h,--help,-Help Shows this help message"
823839 echo " "
824840 echo " Install Location:"
825841 echo " Location is chosen in following order:"
0 commit comments