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

the param -I doesnt support directory wildcard on unix using unix dir separator #5

Open
enricosada opened this issue Mar 25, 2020 · 4 comments

Comments

@enricosada
Copy link

enricosada commented Mar 25, 2020

Environment: running on unix ( Ubuntu 18.04.2 LTS )

given a tree like

src/common/
├── Thor.Sif.Services.IndexCarts
│   └── Thor.Sif.Services.IndexCarts.fsproj
├── Thor.Sif.Services.IndexInventory
│   └── Thor.Sif.Services.IndexInventory.fsproj
├── Thor.Sif.Services.IndexLPNSnapshot
│   └── Thor.Sif.Services.IndexLPNSnapshot.fsproj
└── Thor.Sif.Services.IndexLocationZonesService
     └── Thor.Sif.Services.IndexLocationZonesService.fsproj

this works

dotnet nosln --flatten --quiet -o the.sln -I src\\common\\Thor.Sif.Services.**\\*.fsproj

but this doesnt

dotnet nosln --flatten --quiet -o the.sln -I src/common/Thor.Sif.Services.**/*.fsproj

and generate an empty sln

workaround

Use \\ instead of /

note

i tried without success also:

  • src/common/Thor.Sif.Services.*/*.fsproj
  • src/common/Thor.Sif.Services.*.fsproj
@enricosada
Copy link
Author

i'll send a PR

@eiriktsarpalis
Copy link
Owner

That's surprising, globbing is delegated to the fake library, which I think generally works with forward slashes.

@enricosada
Copy link
Author

Investigating this, it's the bash expansion who happen before the invocation of the program.

using dotnet nosln --flatten --quiet -o the.sln -I "src/common/Thor.Sif.Services.**/*.fsproj" works as expected

if the argument is not quoted, bash expand the passing the list of paths like

-I "src/common/Thor.Sif.Services.IndexCarts/Thor.Sif.Services.IndexCarts.fsproj" "src/common/Thor.Sif.Services.IndexInventory/Thor.Sif.Services.IndexInventory.fsproj" "src/common/Thor.Sif.Services.IndexLPNSnapshot/Thor.Sif.Services.IndexLPNSnapshot.fsproj" ...

so, it's okish and correct, just unexpected.

if -I can accept a list of string (and act like multiple -I), may work OOTB without quotes.
But maybe that can be create other issues, i'll try apply this fix and let's see.

@eiriktsarpalis
Copy link
Owner

eiriktsarpalis commented Mar 25, 2020 via email

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

2 participants