Skip to content

Commit

Permalink
Use Directory.CreateTempSubdirectory (#607)
Browse files Browse the repository at this point in the history
* Use Directory.CreateTempSubdirectory

The advantage here is that the folder gets the correct permissions on Unix.
  • Loading branch information
eerhardt authored Nov 1, 2023
1 parent ea5e3e5 commit e05579c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Aspire.Hosting/DistributedApplicationBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public DistributedApplicationBuilder(DistributedApplicationOptions options)
_innerBuilder.Services.AddHostedService<DcpHostService>();

// We need a unique path per application instance
var path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
var path = Directory.CreateTempSubdirectory().FullName;
_innerBuilder.Services.AddSingleton(new Locations(path));
_innerBuilder.Services.AddSingleton<KubernetesService>();

Expand Down

0 comments on commit e05579c

Please sign in to comment.