Skip to content

JsonConfigFileAccessor incorrectly creates ~/.config/PowerShell #1823

Closed

Description

PS /home/ubuntu/.config/PowerShell> $profile |select *

AllUsersAllHosts : /opt/microsoft/powershell/6.0.0-alpha.8/profile.ps1
AllUsersCurrentHost : /opt/microsoft/powershell/6.0.0-alpha.8/Microsoft.PowerShell_profile.ps1
CurrentUserAllHosts : /home/ubuntu/.config/powershell/profile.ps1
CurrentUserCurrentHost : /home/ubuntu/.config/powershell/Microsoft.PowerShell_profile.ps1
Length : 64

Because the PowerShell folder in .config is camel case, you cannot do things like this:
touch $profile.currentuserallhost
or
vim $profile.currentuserallhost

you get an error that it can't open the file b/c the dir was never made. Since the home directory appears to be created automatically, this should probably just be fixed in the $profile object

Steps to reproduce

Expected behavior

Actual behavior

Environment data

> $PSVersionTable

Activity

  1. toenuff commented on Aug 15, 2016

    @toenuff
    Author

    I take this back - it actually needs to not have camel case, but the folder created automatically in .config has camel case. I'm not certain when this folder was created.

  2. changed the title [-]Profile Path is missing camel case in $profile object[/-] [+]Path in $profile object is case-inconsistent with XDG profile directory[/+] on Aug 16, 2016
  3. added
    Usability
    WG-Interactive-Console
    on Aug 16, 2016
  4. andyleejordan commented on Aug 17, 2016

    @andyleejordan
    Member

    Would you please remove PowerShell, reinstall it, delete your ~/.config/PowerShell folder and run these tests?

  5. andyleejordan commented on Aug 17, 2016

    @andyleejordan
    Member

    Hm, on second thought, they're not testing that the path is created correctly.

  6. andyleejordan commented on Aug 17, 2016

    @andyleejordan
    Member

    Wow. Verified, this is a regression.

  7. added
    Issue-Bug
    on Aug 17, 2016
  8. andyleejordan commented on Aug 17, 2016

    @andyleejordan
    Member

    Dongbo Wang (@daxian-dbw) your changes here broke PowerShell on Linux / OS X configuration paths; they're now incorrectly searching "PowerShell" instead of the XDG BDS directory.

    (It sure looked like this did it!)

  9. andyleejordan commented on Aug 17, 2016

    @andyleejordan
    Member

    We need to re-enable the Base Directory tests (I don't care if they're slow or not), and add checks for the creation of the path.

  10. andyleejordan commented on Aug 17, 2016

    @andyleejordan
    Member

    After further research, it was not Dongbo Wang (@daxian-dbw) changes; it was Mike Richmond (@mirichmo)'s here.

  11. andyleejordan commented on Aug 17, 2016

    @andyleejordan
    Member

    The new GetUserSettingsDirectory() doesn't respect XDG BDS.

  12. added this to the milestone on Aug 17, 2016
  13. andyleejordan commented on Aug 17, 2016

    @andyleejordan
    Member

    Tome Tanasovski (@toenuff) until the bug with GetUserSettingsDirectory() is resolved, (it needs to respect XDG BDS instead of a hard-coded path); please ignore ~/.config/PowerShell completely. Create ~/.config/powershell and add your profile.ps1 there. This is the correct path (and XDG_DATA_HOME will be used if you set it).

  14. changed the title [-]Path in $profile object is case-inconsistent with XDG profile directory[/-] [+]JsonConfigFileAccessor incorrectly creates ~/.config/PowerShell[/+] on Aug 17, 2016
  15. toenuff commented on Aug 17, 2016

    @toenuff
    Author

    Already figured that - glad you guys found the root cause.

  16. modified the milestones: 6.0.0-alpha.10, on Sep 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Issue-BugOS-LinuxResolution-FixedUsabilityWG-Interactive-Console

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions