Skip to content

Subdirectories are not copied by the file system provider #350

Open
@FranklinWhale

Description

@FranklinWhale

Functional impact

If libraries.library is specified without packages.files, it is expected all files and subdirectories are copied to the destination. Currently it is not the case, as only files are copied. As a result, all subdirectories of a library have to be listed as library in libman.json for them to be copied.

Minimal repro steps

Prerequisites: .NET Core SDK, Node.js

  1. Create a ASP.NET Core Razor page project
  2. Install Node.js
  3. Run npm install bootstrap
  4. Run dotnet add package Microsoft.Web.LibraryManager.Build
  5. Create a file named libman.json with the content below:
{
	"version": "1.0",
	"libraries": [
		{
			"provider": "filesystem",
			"library": "node_modules/bootstrap/dist",
			"destination": "wwwroot/lib/bootstrap"
		}
	]
}
  1. Run dotnet build
  2. Check the content inside wwwroot/lib/bootstrap

Expected result

All files and subdirectories under node_modules/bootstrap/dist are copied to wwwroot/lib/bootstrap

Actual result

Only the .DS_Store file, which is under node_modules/bootstrap/dist, is coped

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions