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

add-project PathTooLongException #28

Open
MikaelPorttila opened this issue Apr 23, 2016 · 5 comments
Open

add-project PathTooLongException #28

MikaelPorttila opened this issue Apr 23, 2016 · 5 comments

Comments

@MikaelPorttila
Copy link

Hi!
I really like pecan-waffle and planning to use it on all of my template projects, but today I ran into this "path is too long"-exception (Windows has never been a fan of long paths).
I could easily build a workaround by excluding my jspm-package folder but i think this kind of tool should be able to handle even the craziest of paths so I'll report it as an issue. :)

*Error message: *
Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the d
irectory name must be less than 248 characters.
At C:\Users\x\Documents\WindowsPowerShell\Modules\pecan-waffle\pecan-waffle.psm1:1232 char:18

  • ... (Get-ChildItem $mappedTempWorkDir $excludeStr -Recurse -Fi ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ReadError: (C:\Users\x...nternal-plugins:String) [Get-ChildItem], PathTooLongException
    • FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand
@sayedihashimi
Copy link
Member

@MikaelPorttila ideally we would handle long files here. I have some ideas about how I could support long files, but adding the support may take a bit of time. Until then if you exclude those folders you shouldn't run into the long file issue. If you exclude a folder and still run into a long path issue please let me know.

If you need your template to drop files and they may have long files then let me know. You can do that, but it will be a bit of extra work on your part.

FYI last night I merged a bunch of changes from the dev branch. If you installed before that time I'd recommend updating.

@MikaelPorttila
Copy link
Author

I installed pecan-waffle this morning (Swedish time) so I should be running your latest code.
Excluding long paths fixed the issue and I was able to get a working copy of the template. :-) 👍

Thanks for your help!
Will you create another issue for the long path-support or should I keep this one open?

@sayedihashimi
Copy link
Member

sayedihashimi commented Apr 28, 2016

@MikaelPorttila OK I've worked on long path support and I think I've covered all the touch points. The code is in the longpath branch. I got tied up with some actual work before being able to test it. Any chance you can try it?

@dotnetnate
Copy link

I was able to test it and it appears to work. I'm definitely having pathing issues of this solely on project names for complex projects so this is a pretty mandatory fix for us to use templates.

@sayedihashimi
Copy link
Member

@dotnetnate can u try from the longpath branch to see if that fixes your issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants