Skip to content

Commit

Permalink
Merge pull request #64 from FaserF/FaserF-patch-1
Browse files Browse the repository at this point in the history
Write username into log file to fix permission issues
  • Loading branch information
Romanitho committed Oct 28, 2022
2 parents b1d9eda + 628ccde commit 57973f2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion winget-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ function Start-Init {
}

#Log file
$Script:LogFile = "$LogPath\install.log"
if ([System.Security.Principal.WindowsIdentity]::GetCurrent().IsSystem) {
$Script:LogFile = "$LogPath\install.log"
}
else {
$Script:LogFile = "$LogPath\install_$env:UserName.log"
}

#Log Header
if ($Uninstall) {
Expand Down

0 comments on commit 57973f2

Please sign in to comment.