Skip to content

Commit

Permalink
Improve Transcript (#2620)
Browse files Browse the repository at this point in the history
* improve log logics

* spelling fix

* change date format
  • Loading branch information
MyDrift-user authored Aug 28, 2024
1 parent 488cd8d commit 6a99be9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion functions/private/Update-WinUtilProgramWinget.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Function Update-WinUtilProgramWinget {

$host.ui.RawUI.WindowTitle = """Winget Install"""

Start-Transcript $ENV:TEMP\winget-update.log -Append
Start-Transcript "$logdir\winget-update_$dateTime.log" -Append
winget upgrade --all --accept-source-agreements --accept-package-agreements --scope=machine --silent

}
Expand Down
8 changes: 4 additions & 4 deletions scripts/start.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ if ($Run) {
$PARAM_RUN = $true
}

if (!(Test-Path -Path $ENV:TEMP)) {
New-Item -ItemType Directory -Force -Path $ENV:TEMP
}
$dateTime = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"

Start-Transcript $ENV:TEMP\Winutil.log -Append
$logdir = "$env:localappdata\winutil\logs"
[System.IO.Directory]::CreateDirectory("$logdir")
Start-Transcript -Path "$logdir\winutil_$dateTime.log" -Append

# Load DLLs
Add-Type -AssemblyName PresentationFramework
Expand Down

0 comments on commit 6a99be9

Please sign in to comment.