@@ -77,7 +77,7 @@ public void InstallPackages(
7777 bool includeXML ,
7878 List < string > pathsToInstallPkg )
7979 {
80- _cmdletPassedIn . WriteDebug ( string . Format ( "Parameters passed in >>> Name: '{0}'; Version: '{1}'; Prerelease: '{2}'; Repository: '{3}'; " +
80+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Parameters passed in >>> Name: '{0}'; Version: '{1}'; Prerelease: '{2}'; Repository: '{3}'; " +
8181 "AcceptLicense: '{4}'; Quiet: '{5}'; Reinstall: '{6}'; TrustRepository: '{7}'; NoClobber: '{8}';" ,
8282 string . Join ( "," , names ) ,
8383 ( versionRange != null ? versionRange . OriginalString : string . Empty ) ,
@@ -124,13 +124,13 @@ public void ProcessRepositories(string[] packageNames, string[] repository, bool
124124
125125 var sourceTrusted = false ;
126126 string repoName = repo . Name ;
127- _cmdletPassedIn . WriteDebug ( string . Format ( "Attempting to search for packages in '{0}'" , repoName ) ) ;
127+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Attempting to search for packages in '{0}'" , repoName ) ) ;
128128
129129 // Source is only trusted if it's set at the repository level to be trusted, -TrustRepository flag is true, -Force flag is true
130130 // OR the user issues trust interactively via console.
131131 if ( repo . Trusted == false && ! trustRepository && ! _force )
132132 {
133- _cmdletPassedIn . WriteDebug ( "Checking if untrusted repository should be used" ) ;
133+ _cmdletPassedIn . WriteVerbose ( "Checking if untrusted repository should be used" ) ;
134134
135135 if ( ! ( yesToAll || noToAll ) )
136136 {
@@ -146,7 +146,7 @@ public void ProcessRepositories(string[] packageNames, string[] repository, bool
146146
147147 if ( sourceTrusted || yesToAll )
148148 {
149- _cmdletPassedIn . WriteDebug ( "Untrusted repository accepted as trusted source." ) ;
149+ _cmdletPassedIn . WriteVerbose ( "Untrusted repository accepted as trusted source." ) ;
150150
151151 // If it can't find the pkg in one repository, it'll look for it in the next repo in the list
152152 var isLocalRepo = repo . Url . AbsoluteUri . StartsWith ( Uri . UriSchemeFile + Uri . SchemeDelimiter , StringComparison . OrdinalIgnoreCase ) ;
@@ -279,7 +279,7 @@ private List<string> InstallPackage(IEnumerable<PSResourceInfo> pkgsToInstall, s
279279
280280 if ( ! NuGetVersion . TryParse ( createFullVersion , out NuGetVersion pkgVersion ) )
281281 {
282- _cmdletPassedIn . WriteDebug ( string . Format ( "Error parsing package '{0}' version '{1}' into a NuGetVersion" , p . Name , p . Version . ToString ( ) ) ) ;
282+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Error parsing package '{0}' version '{1}' into a NuGetVersion" , p . Name , p . Version . ToString ( ) ) ) ;
283283 continue ;
284284 }
285285 var pkgIdentity = new PackageIdentity ( p . Name , pkgVersion ) ;
@@ -350,7 +350,7 @@ private List<string> InstallPackage(IEnumerable<PSResourceInfo> pkgsToInstall, s
350350 }
351351 catch ( Exception e )
352352 {
353- _cmdletPassedIn . WriteDebug ( string . Format ( "Error attempting download: '{0}'" , e . Message ) ) ;
353+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Error attempting download: '{0}'" , e . Message ) ) ;
354354 }
355355 finally
356356 {
@@ -359,7 +359,7 @@ private List<string> InstallPackage(IEnumerable<PSResourceInfo> pkgsToInstall, s
359359 }
360360 }
361361
362- _cmdletPassedIn . WriteDebug ( string . Format ( "Successfully able to download package from source to: '{0}'" , tempInstallPath ) ) ;
362+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Successfully able to download package from source to: '{0}'" , tempInstallPath ) ) ;
363363
364364 // Prompt if module requires license acceptance (need to read info license acceptance info from the module manifest)
365365 // pkgIdentity.Version.Version gets the version without metadata or release labels.
@@ -426,12 +426,12 @@ private List<string> InstallPackage(IEnumerable<PSResourceInfo> pkgsToInstall, s
426426 }
427427 catch ( Exception e )
428428 {
429- _cmdletPassedIn . WriteDebug ( string . Format ( "Unable to successfully install package '{0}': '{1}'" , p . Name , e . Message ) ) ;
429+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Unable to successfully install package '{0}': '{1}'" , p . Name , e . Message ) ) ;
430430 }
431431 finally
432432 {
433433 // Delete the temp directory and all its contents
434- _cmdletPassedIn . WriteDebug ( string . Format ( "Attempting to delete '{0}'" , tempInstallPath ) ) ;
434+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Attempting to delete '{0}'" , tempInstallPath ) ) ;
435435 if ( Directory . Exists ( tempInstallPath ) )
436436 {
437437 Directory . Delete ( tempInstallPath , true ) ;
@@ -551,32 +551,32 @@ private void DeleteExtraneousFiles(string tempInstallPath, PackageIdentity pkgId
551551 // Unforunately have to check if each file exists because it may or may not be there
552552 if ( File . Exists ( nupkgSHAToDelete ) )
553553 {
554- _cmdletPassedIn . WriteDebug ( string . Format ( "Deleting '{0}'" , nupkgSHAToDelete ) ) ;
554+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Deleting '{0}'" , nupkgSHAToDelete ) ) ;
555555 File . Delete ( nupkgSHAToDelete ) ;
556556 }
557557 if ( File . Exists ( nuspecToDelete ) )
558558 {
559- _cmdletPassedIn . WriteDebug ( string . Format ( "Deleting '{0}'" , nuspecToDelete ) ) ;
559+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Deleting '{0}'" , nuspecToDelete ) ) ;
560560 File . Delete ( nuspecToDelete ) ;
561561 }
562562 if ( File . Exists ( nupkgToDelete ) )
563563 {
564- _cmdletPassedIn . WriteDebug ( string . Format ( "Deleting '{0}'" , nupkgToDelete ) ) ;
564+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Deleting '{0}'" , nupkgToDelete ) ) ;
565565 File . Delete ( nupkgToDelete ) ;
566566 }
567567 if ( File . Exists ( contentTypesToDelete ) )
568568 {
569- _cmdletPassedIn . WriteDebug ( string . Format ( "Deleting '{0}'" , contentTypesToDelete ) ) ;
569+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Deleting '{0}'" , contentTypesToDelete ) ) ;
570570 File . Delete ( contentTypesToDelete ) ;
571571 }
572572 if ( Directory . Exists ( relsDirToDelete ) )
573573 {
574- _cmdletPassedIn . WriteDebug ( string . Format ( "Deleting '{0}'" , relsDirToDelete ) ) ;
574+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Deleting '{0}'" , relsDirToDelete ) ) ;
575575 Directory . Delete ( relsDirToDelete , true ) ;
576576 }
577577 if ( Directory . Exists ( packageDirToDelete ) )
578578 {
579- _cmdletPassedIn . WriteDebug ( string . Format ( "Deleting '{0}'" , packageDirToDelete ) ) ;
579+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Deleting '{0}'" , packageDirToDelete ) ) ;
580580 Directory . Delete ( packageDirToDelete , true ) ;
581581 }
582582 }
@@ -611,50 +611,50 @@ private void MoveFilesIntoInstallPath(
611611 {
612612 // Need to delete old xml files because there can only be 1 per script
613613 var scriptXML = p . Name + "_InstalledScriptInfo.xml" ;
614- _cmdletPassedIn . WriteDebug ( string . Format ( "Checking if path '{0}' exists: " , File . Exists ( Path . Combine ( installPath , "InstalledScriptInfos" , scriptXML ) ) ) ) ;
614+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Checking if path '{0}' exists: " , File . Exists ( Path . Combine ( installPath , "InstalledScriptInfos" , scriptXML ) ) ) ) ;
615615 if ( File . Exists ( Path . Combine ( installPath , "InstalledScriptInfos" , scriptXML ) ) )
616616 {
617- _cmdletPassedIn . WriteDebug ( string . Format ( "Deleting script metadata XML" ) ) ;
617+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Deleting script metadata XML" ) ) ;
618618 File . Delete ( Path . Combine ( installPath , "InstalledScriptInfos" , scriptXML ) ) ;
619619 }
620620
621- _cmdletPassedIn . WriteDebug ( string . Format ( "Moving '{0}' to '{1}'" , Path . Combine ( dirNameVersion , scriptXML ) , Path . Combine ( installPath , "InstalledScriptInfos" , scriptXML ) ) ) ;
621+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Moving '{0}' to '{1}'" , Path . Combine ( dirNameVersion , scriptXML ) , Path . Combine ( installPath , "InstalledScriptInfos" , scriptXML ) ) ) ;
622622 Utils . MoveFiles ( Path . Combine ( dirNameVersion , scriptXML ) , Path . Combine ( installPath , "InstalledScriptInfos" , scriptXML ) ) ;
623623
624624 // Need to delete old script file, if that exists
625- _cmdletPassedIn . WriteDebug ( string . Format ( "Checking if path '{0}' exists: " , File . Exists ( Path . Combine ( finalModuleVersionDir , p . Name + ".ps1" ) ) ) ) ;
625+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Checking if path '{0}' exists: " , File . Exists ( Path . Combine ( finalModuleVersionDir , p . Name + ".ps1" ) ) ) ) ;
626626 if ( File . Exists ( Path . Combine ( finalModuleVersionDir , p . Name + ".ps1" ) ) )
627627 {
628- _cmdletPassedIn . WriteDebug ( string . Format ( "Deleting script file" ) ) ;
628+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Deleting script file" ) ) ;
629629 File . Delete ( Path . Combine ( finalModuleVersionDir , p . Name + ".ps1" ) ) ;
630630 }
631631 }
632632
633- _cmdletPassedIn . WriteDebug ( string . Format ( "Moving '{0}' to '{1}'" , scriptPath , Path . Combine ( finalModuleVersionDir , p . Name + ".ps1" ) ) ) ;
633+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Moving '{0}' to '{1}'" , scriptPath , Path . Combine ( finalModuleVersionDir , p . Name + ".ps1" ) ) ) ;
634634 Utils . MoveFiles ( scriptPath , Path . Combine ( finalModuleVersionDir , p . Name + ".ps1" ) ) ;
635635 }
636636 else
637637 {
638638 // If new path does not exist
639639 if ( ! Directory . Exists ( newPathParent ) )
640640 {
641- _cmdletPassedIn . WriteDebug ( string . Format ( "Attempting to move '{0}' to '{1}'" , tempModuleVersionDir , finalModuleVersionDir ) ) ;
641+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Attempting to move '{0}' to '{1}'" , tempModuleVersionDir , finalModuleVersionDir ) ) ;
642642 Directory . CreateDirectory ( newPathParent ) ;
643643 Utils . MoveDirectory ( tempModuleVersionDir , finalModuleVersionDir ) ;
644644 }
645645 else
646646 {
647- _cmdletPassedIn . WriteDebug ( string . Format ( "Temporary module version directory is: '{0}'" , tempModuleVersionDir ) ) ;
647+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Temporary module version directory is: '{0}'" , tempModuleVersionDir ) ) ;
648648
649649 // At this point if
650650 if ( Directory . Exists ( finalModuleVersionDir ) )
651651 {
652652 // Delete the directory path before replacing it with the new module
653- _cmdletPassedIn . WriteDebug ( string . Format ( "Attempting to delete '{0}'" , finalModuleVersionDir ) ) ;
653+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Attempting to delete '{0}'" , finalModuleVersionDir ) ) ;
654654 Directory . Delete ( finalModuleVersionDir , true ) ;
655655 }
656656
657- _cmdletPassedIn . WriteDebug ( string . Format ( "Attempting to move '{0}' to '{1}'" , tempModuleVersionDir , finalModuleVersionDir ) ) ;
657+ _cmdletPassedIn . WriteVerbose ( string . Format ( "Attempting to move '{0}' to '{1}'" , tempModuleVersionDir , finalModuleVersionDir ) ) ;
658658 Utils . MoveDirectory ( tempModuleVersionDir , finalModuleVersionDir ) ;
659659 }
660660 }
0 commit comments