From bfb1c607ac74ddcaf0fb53c5ff8bd00df0991b65 Mon Sep 17 00:00:00 2001 From: TinaMor Date: Tue, 20 May 2025 23:39:31 +0300 Subject: [PATCH 1/2] Use logger module for UpdateEnvironmentPath.psm1 instead of Write-* commands --- containers-toolkit/Private/UpdateEnvironmentPath.psm1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/containers-toolkit/Private/UpdateEnvironmentPath.psm1 b/containers-toolkit/Private/UpdateEnvironmentPath.psm1 index 4e0353d..0e09fba 100644 --- a/containers-toolkit/Private/UpdateEnvironmentPath.psm1 +++ b/containers-toolkit/Private/UpdateEnvironmentPath.psm1 @@ -1,4 +1,4 @@ -########################################################################### +########################################################################### # # # Copyright (c) Microsoft Corporation. All rights reserved. # # # @@ -57,7 +57,7 @@ function Update-EnvironmentPath { } if ($pathChanged) { - Write-Information -InformationAction Continue -MessageData "$ActionVerb $toAction in $PathType Environment Path" + [Logger]::Info("$ActionVerb $toAction in $PathType Environment Path") # Get the updated path $updatedPath = switch ($Action) { @@ -68,7 +68,7 @@ function Update-EnvironmentPath { # For tests, we do not want to update the environment path if ($env:pester) { - Write-Debug "Skipping environment path update for tests" + [Logger]::Debug("Skipping environment path update for tests") return $updatedPath } From 5cb7ab2abfc2129f032870bd76b8a426a883bb2b Mon Sep 17 00:00:00 2001 From: Tina Murimi Date: Wed, 21 May 2025 16:48:35 +0300 Subject: [PATCH 2/2] Import logger modules --- containers-toolkit/Private/UpdateEnvironmentPath.psm1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/containers-toolkit/Private/UpdateEnvironmentPath.psm1 b/containers-toolkit/Private/UpdateEnvironmentPath.psm1 index 0e09fba..74fff49 100644 --- a/containers-toolkit/Private/UpdateEnvironmentPath.psm1 +++ b/containers-toolkit/Private/UpdateEnvironmentPath.psm1 @@ -6,6 +6,8 @@ # # ########################################################################### +using module "..\Private\logger.psm1" + function Update-EnvironmentPath { [CmdletBinding( SupportsShouldProcess = $true