You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 19, 2019. It is now read-only.
If the success.log or failure.log already exists in the temp directory, the respective function will attempt to rename it to .old. In the functions, there is a line to join-path the path with ".old". Using the line below, the new path becomes c:\users\scott\appdata\temp\chocolatey\myapp\failure.log.old which generates an error when trying to rename the file.
Error Line $oldSuccessLog = Join-Path "$successLog" '.old'
New Line $oldSuccessLog = "$successLog".replace('.log','.old')
I am not an expert in Powershell and there might be a better option to the replace command. But using the replace command gave me the line c:\users\scott\appdata\temp\chocolatey\myapp\failure.old
You will see this line in both functions (Write-ChocolateySuccess.ps1 and
Write-ChocolateyFailure.ps1)
If the success.log or failure.log already exists in the temp directory, the respective function will attempt to rename it to .old. In the functions, there is a line to join-path the path with ".old". Using the line below, the new path becomes c:\users\scott\appdata\temp\chocolatey\myapp\failure.log.old which generates an error when trying to rename the file.
Error Line
$oldSuccessLog = Join-Path "$successLog" '.old'
New Line
$oldSuccessLog = "$successLog".replace('.log','.old')
I am not an expert in Powershell and there might be a better option to the replace command. But using the replace command gave me the line c:\users\scott\appdata\temp\chocolatey\myapp\failure.old
You will see this line in both functions (Write-ChocolateySuccess.ps1 and
Write-ChocolateyFailure.ps1)
https://groups.google.com/group/chocolatey/browse_thread/thread/5e841b0219a5537?hl=en
The text was updated successfully, but these errors were encountered: