Skip to content

Commit

Permalink
🩹 [Patch]: Add some additional logging (#29)
Browse files Browse the repository at this point in the history
## Description

- Add some additional logging

## Type of change

<!-- Use the check-boxes [x] on the options that are relevant. -->

- [ ] 📖 [Docs]
- [x] 🪲 [Fix]
- [ ] 🩹 [Patch]
- [ ] ⚠️ [Security fix]
- [ ] 🚀 [Feature]
- [ ] 🌟 [Breaking change]

## Checklist

<!-- Use the check-boxes [x] on the options that are relevant. -->

- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
  • Loading branch information
MariusStorhaug authored Nov 7, 2024
1 parent a11165c commit 14c82f2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/functions/private/Initialize-VariableStore.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
)

$folderName = ".$($Name -replace '^\.')".ToLower()
Write-Verbose "Variable store folder: [$folderName]"
$configFilePath = Join-Path -Path $HOME -ChildPath "$folderName/config.json"

if (-not (Test-Path -Path $configFilePath)) {
Write-Verbose "Variable store file: [$configFilePath]"
$configFileExists = Test-Path -Path $configFilePath
Write-Verbose "Variable store file exists: [$configFileExists]"
if (-not $configFileExists) {
$null = New-Item -Path $configFilePath -ItemType File -Force
Set-StoreVariable -Name 'ConfigFilePath' -Value $configFilePath
Set-StoreVariable -Name 'Name' -Value $Name
Expand Down

0 comments on commit 14c82f2

Please sign in to comment.