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

Disallow dotnet restore at OS root #13131

Closed
richlander opened this issue Jan 5, 2024 · 9 comments
Closed

Disallow dotnet restore at OS root #13131

richlander opened this issue Jan 5, 2024 · 9 comments
Labels
Type:DCR Design Change Request

Comments

@richlander
Copy link

I have seen this issue multiple times.

dotnet/dotnet-docker#5085

@ghost
Copy link

ghost commented Jan 5, 2024

@richlander Issue is missing Type label, remember to add a Type label

@baronfel
Copy link

baronfel commented Jan 5, 2024

@rainersigwald The linked issue had the user stalling out during (I think) evaluation when a glob would have included system root - didn't we do something recently in MSBuild around detecting/logging/warning when an item glob including the root is expanded?

@rainersigwald
Copy link

dotnet/msbuild#7029 added warnings like

 warning MSB5029: The value "**/*.*proj" of the "Exclude" attribute in element <ItemGroup> in file "C:\Program Files\dotnet\sdk\8.0.200-preview.23624.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.props (30,62)" is a wildcard that results in enumerating all files on the drive, which was likely not intended. Check that referenced properties are always defined.

But even groveling a whole container filesystem shouldn't hang indefinitely. Maybe something is getting caught in a symlink loop?

@richlander
Copy link
Author

Perhaps the CLI should provide this error/warning. I'd like to this as an error and require some --force style option to override it. This behavior isn't useful.

@jeffkl
Copy link
Contributor

jeffkl commented Jan 16, 2024

Should we move this issue then?

@jeffkl jeffkl added Type:DCR Design Change Request WaitingForCustomer Applied when a NuGet triage person needs more info from the OP and removed Triage:Untriaged missing-required-type The required type label is missing. labels Jan 16, 2024
@baronfel
Copy link

@jeffkl seems reasonable to me, yeah.

@richlander
Copy link
Author

Does the CLI have appropriate context on the context of the build/restore?

@ghost ghost added WaitingForClientTeam Customer replied, needs attention from client team. Do not apply this label manually. and removed WaitingForCustomer Applied when a NuGet triage person needs more info from the OP labels Jan 16, 2024
@baronfel
Copy link

It already knows the working directory that it's invoked from, and the project/solution that will be built - we could check either/both of those to safety-check before actually invoking MSBuild.

@ghost ghost added WaitingForCustomer Applied when a NuGet triage person needs more info from the OP and removed WaitingForClientTeam Customer replied, needs attention from client team. Do not apply this label manually. labels Jan 16, 2024
@richlander
Copy link
Author

Sounds good. I'll close this issue and make a feature request at dotnet/sdk since issue transfer doesn't work across orgs (AFAIK).

@ghost ghost removed the WaitingForCustomer Applied when a NuGet triage person needs more info from the OP label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:DCR Design Change Request
Projects
None yet
Development

No branches or pull requests

5 participants