NuKeeperDotNet / NuKeeper

Automagically update nuget packages in .NET projects
Apache License 2.0
541 stars 127 forks source link

NameConflictException - The filename or extension is too long. #977

Closed timmkrause closed 4 years ago

timmkrause commented 4 years ago

🐛 Bug Report

When using/updating to 0.28.0 we get the error below (0.27.1 is working fine, so we downgraded to 0.27.1 again).

Additionally this does not result in a bad exit code (I saw some development regarding bad exit codes, has it already shipped with this version or when will it ship?).

Starting: Run NuKeeper
==============================================================================
Task         : NuKeeper
Description  : Version 0.4.34
Version      : 0.4.34
Author       : NuKeeper
Help         : For help please visit https://github.com/NuKeeperDotNet/NuKeeper
==============================================================================
C:\agents\2.168.2\externals\git\cmd\git.exe config --global user.name NuKeeper
C:\agents\2.168.2\externals\git\cmd\git.exe config --global user.email nukeeper@nukeeper.com
Downloading: https://api.nuget.org/v3-flatcontainer/nukeeper/0.28.0/nukeeper.0.28.0.nupkg
Extracting archive
C:\windows\system32\chcp.com 65001
Active code page: 65001
C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('D:\a\_temp\63edaafc-2eac-4d4f-8bf4-bf2fd60ab12d', 'D:\a\_temp\63edaafc-2eac-4d4f-8bf4-bf2fd60ab12d.unpacked')"
Caching tool: nukeeper 0.28.0 x64
C:\hostedtoolcache\windows\dotnet\dotnet.exe C:\hostedtoolcache\windows\nukeeper\0.28.0\x64\NuKeeper.dll repo D:\a\1\s *** --targetBranch origin/develop --consolidate --exclude (bootstrap|.*jQuery.*|T4MVC.*|SpecFlow.*|Microsoft.Net.Compilers)
Matched uri 'https://dev.azure.com/OMITTED/' to collaboration platform 'AzureDevOps'
Using upstream fork as push, for project OMITTED at https://OMITTED@dev.azure.com/OMITTED
User name missing from profile, falling back to .gitconfig
Git clone https://OMITTED@dev.azure.com/OMITTED, branch default, to C:\Users\VssAdministrator\AppData\Local\Temp\NuKeeper\repo-57f82fe42c2e4752b4016fa648795726
Failed on repo OMITTED NameConflictException : failed to stat 'C:/Users/VssAdministrator/AppData/Local/Temp/NuKeeper/repo-57f82fe42c2e4752b4016fa648795726/src/xxxxxxxxxxxxxx.xxxxxxxx.xxxxxxxxxxxxxx.xxxxxxxxxxx/Connected Services/xxxxxxxxxxxxxx.xxxxxxxx.xxxxxxxxxxxxxx.xxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxx/ConnectedService.json': The filename or extension is too long.

Finishing: Run NuKeeper

Expected behavior

Should work.

Reproduction steps

Use long path within the Git repository (count of xxx was exactly replaced with the number of characters).

Configuration

Version: 0.28.0 (by using Azure DevOps task)

Platform if applicable:

johntyrrell commented 4 years ago

I worked around this issue by calling nukeeper in powershell using the parameter -cdir "c:\temp\xx". This tells nukeeper to checkout the repository to c:\temp\xx instead of the %temp% path.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

CrispyDrone commented 3 years ago

If you are on windows 10, you could try disabling the 260 character limit on file paths.