Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when paths in project path starts with a digit #28

Open
janegilring opened this issue Oct 25, 2019 · 5 comments
Open

Errors when paths in project path starts with a digit #28

janegilring opened this issue Oct 25, 2019 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@janegilring
Copy link

janegilring commented Oct 25, 2019

Some paths in one of my project folders contains dots and underscores. This leads to errors when loading PSProfile:

Import-Metadata : At C:\Users\janring\AppData\Roaming\powershell\SCRT HQ\PSProfile\Configuration.psd1:76 char:18
+   GitPathMap = @{
+                  ~
Missing closing '}' in statement block or type definition.
At C:\Users\janring\AppData\Roaming\powershell\SCRT HQ\PSProfile\Configuration.psd1:77 char:5
+     2019MVPDagen_org = 'C:\Users\janring\Git\2019MVPDagen_org'
+     ~~~~~~~~~~~~~~~~
@scrthq scrthq self-assigned this Oct 28, 2019
@scrthq scrthq added the bug Something isn't working label Oct 28, 2019
@scrthq
Copy link
Member

scrthq commented Oct 28, 2019

Hey @janegilring - This appears to be an issue with the Configuration module and how it's serializing / deserializing hashtable keys. Going to check it out, shouldn't be too difficult to replicate! CC: @Jaykul

@scrthq
Copy link
Member

scrthq commented Nov 2, 2019

So, the odd part is that I have projects with underscores as well, but they don't seem to break it like the error is reporting for you.

If you inspect the configuration file, do you see any points where the syntax breaks?

code $PSProfile.Settings.ConfigurationPath

@janegilring
Copy link
Author

The issue might not be underscores after all. I`ll send you my complete autogenerated GitMapPath in a DM.

@janegilring janegilring changed the title Errors when paths in project path contains underscore or dot Errors when paths in project path starts with a digit Nov 2, 2019
@scrthq
Copy link
Member

scrthq commented Nov 2, 2019

Filling in here, it looks like the issue is with keys on the manifest that start with an integer not being liked too much by PowerShell. Need to fix within Configuration so that any dictionary key starting with an int is wrapped in quotes CC @Jaykul

@scrthq
Copy link
Member

scrthq commented Nov 2, 2019

Opened up PoshCode/Configuration#37 to resolve this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants