mob-sakai / GitDependencyResolverForUnity

This plugin resolves git url dependencies in the package for Unity Package Manager. You can use a git url as a package dependency!
MIT License
248 stars 33 forks source link

Upon first test received : System.UnauthorizedAccessException: Access to the path is denied #25

Closed MostHated closed 3 years ago

MostHated commented 4 years ago

Hey there, I went to import and test this out, but on my first go of trying to import I received the following message:

Error Message ```bash System.UnauthorizedAccessException: Access to the path is denied. at System.IO.Directory.Move (System.String sourceDirName, System.String destDirName) [0x000dd] in <9577ac7a62ef43179789031239ba8798>:0 at Coffee.GitDependencyResolver.DirUtils.Move (System.String srcDir, System.String dstDir, System.Func`2[T,TResult] pred) [0x00073] in E:\GitHub\instance-id\LocalPackages\Library\PackageCache\com.coffee.git-dependency-resolver@726d5e4aa9\Editor\DirUtils.cs:24 at Coffee.GitDependencyResolver.Resolver.StartResolve () [0x002da] in E:\GitHub\instance-id\LocalPackages\Library\PackageCache\com.coffee.git-dependency-resolver@726d5e4aa9\Editor\GitDependencyResolver.cs:190 at Coffee.GitDependencyResolver.Resolver..cctor () [0x00013] in E:\GitHub\instance-id\LocalPackages\Library\PackageCache\com.coffee.git-dependency-resolver@726d5e4aa9\Editor\GitDependencyResolver.cs:35 UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes(Type[]) ```

This is in Unity 2019.4.14f1 - Fresh project, all default settings. I did try changing it to .Net 4.x to see if it would make a difference, but it did not.

The items added to my manifest.json are as follows,

Project Manifest.json ```json5 { "dependencies": { "com.coffee.git-dependency-resolver": "https://github.com/mob-sakai/GitDependencyResolverForUnity.git", "com.gameframe.packages": "file:../Packages/instance.id/UnityPackages", "id.instance.aboveaverageinspector": "https://github.com/instance-id/AboveAverageInspector.git#upm", // My package I am trying to test importing with dependencies // ... } } ```

The dependencies for my AboveAverageInspector package that I was testing out are as follows:

Dependencies in package.json ```json5 "gitDependencies": { "id.instance.extensions": "https://github.com/instance-id/Extensions.git#v0.1.2" }, ```

I believe I have everything set up correctly, but I don't recall reading anything about there being any changes to permissions necessary? Not sure what to make of this. Thanks, -MH

mob-sakai commented 3 years ago

@MostHated The issue is reproduced on Linux.

mob-sakai commented 3 years ago

Fixed in 2.0.0