Skip to content

Commit f81cd25

Browse files
committed
Add logging in installhelper
1 parent 66dfa11 commit f81cd25

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/code/InstallHelper.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,18 @@ private bool TryInstallToTempPath(
972972
try
973973
{
974974
var pathToFile = Path.Combine(tempInstallPath, $"{pkgName}.{normalizedPkgVersion}.zip");
975+
_cmdletPassedIn.WriteVerbose($"pathToFile IS: {pathToFile}.");
976+
977+
if (File.Exists(pathToFile))
978+
{
979+
_cmdletPassedIn.WriteVerbose($"pathToFile EXISTS.");
980+
981+
}
982+
else {
983+
_cmdletPassedIn.WriteVerbose($"pathToFile DOES NOT EXIST.");
984+
985+
}
986+
975987
using var fs = File.Create(pathToFile);
976988
responseStream.Seek(0, System.IO.SeekOrigin.Begin);
977989
responseStream.CopyTo(fs);
@@ -980,6 +992,7 @@ private bool TryInstallToTempPath(
980992
// Expand the zip file
981993
var pkgVersion = pkgToInstall.Version.ToString();
982994
var tempDirNameVersion = Path.Combine(tempInstallPath, pkgName.ToLower(), pkgVersion);
995+
983996
Directory.CreateDirectory(tempDirNameVersion);
984997

985998
if (!TryExtractToDirectory(pathToFile, tempDirNameVersion, out error))
@@ -992,6 +1005,7 @@ private bool TryInstallToTempPath(
9921005
var moduleManifest = Path.Combine(tempDirNameVersion, pkgName + PSDataFileExt);
9931006
var scriptPath = Path.Combine(tempDirNameVersion, pkgName + PSScriptFileExt);
9941007

1008+
_cmdletPassedIn.WriteVerbose($"MODULE MANIFEST PATH IS: {moduleManifest}.");
9951009
bool isModule = File.Exists(moduleManifest);
9961010
bool isScript = File.Exists(scriptPath);
9971011

0 commit comments

Comments
 (0)