lukesampson / pshazz

Give your powershell some pizazz.
The Unlicense
575 stars 40 forks source link

Recent XDG_CONFIG_HOME refactor seems to cause an issue for fresh installs #91

Closed joshgentry closed 5 years ago

joshgentry commented 5 years ago

I haven't had an opportunity to dig deeply, so I'm only seeing what is the most likely culprit, but the recent commit lukesampson/pshazz@9bda1e3 may have adjusted setting up a fresh install in a way that fails to create the config file if it does not exist (as the path does not exist).

This is the error I'm seeing:

Set-Content : Could not find a part of the path 'C:\Users\user\.config\pshazz\config.json'.
At C:\Users\user\scoop\apps\pshazz\current\lib\config.ps1:24 char:27
+     ConvertTo-Json $cfg | Set-Content $configFile -Encoding ASCII
+                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\user\.config\pshazz\config.json:String) [Set-Content], DirectoryNotFoundException
    + FullyQualifiedErrorId : GetContentWriterDirectoryNotFoundError,Microsoft.PowerShell.Commands.SetContentCommand

This error occurs immediately after:

scoop install --arch 64bit concfg
scoop install pshazz
concfg import gruvbox-dark-medium
pshazz use lambda

Note that running pshazz init does not correct the issue.

chawyehsu commented 5 years ago

You will be able to install new version of pshazz from scoop soon, thanks for your patience.

joshgentry commented 5 years ago

Thanks for the quick fix @h404bi!