Skip to content

Commit

Permalink
Perform backup of previous settings file
Browse files Browse the repository at this point in the history
  • Loading branch information
scaryrawr committed Jun 18, 2020
1 parent fcad754 commit 68ddda2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions winwal.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,16 @@ function Update-WalCommandPrompt {
}

function Update-WalTerminal {
$terminalDir = "$HOME/AppData/Local/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/LocalState"
$terminalProfile = "$HOME/AppData/Local/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/LocalState/settings.json"

if (!(Test-Path $terminalProfile)) {
# We'll probably fail out if we don't return early
return
}

Copy-Item -Path $terminalProfile -Destination "$terminalDir/settings.json.bak"

# Load existing profile
$configData = (Get-Content -Path $terminalProfile | ConvertFrom-Json) | Where-Object { $_ -ne $null }

Expand Down

0 comments on commit 68ddda2

Please sign in to comment.