This repository was archived by the owner on Apr 8, 2020. It is now read-only.
File tree 2 files changed +2
-2
lines changed
src/Microsoft.AspNetCore.NodeServices/Util
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 7
7
- ps : $urlCurrent = "https://dotnetcli.azureedge.net/dotnet/Sdk/2.0.0-preview2-006497/dotnet-sdk-2.0.0-preview2-006497-win-x64.zip"
8
8
- ps : $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetsdk"
9
9
- ps : mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null
10
- - ps : $tempFileCurrent = [System.IO.Path]::GetTempFileName( )
10
+ - ps : $tempFileCurrent = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName() )
11
11
- ps : (New-Object System.Net.WebClient).DownloadFile($urlCurrent, $tempFileCurrent)
12
12
- ps : Add-Type -AssemblyName System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory($tempFileCurrent, $env:DOTNET_INSTALL_DIR)
13
13
- ps : $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public sealed class StringAsTempFile : IDisposable
21
21
/// <param name="applicationStoppingToken">A token that indicates when the host application is stopping.</param>
22
22
public StringAsTempFile ( string content , CancellationToken applicationStoppingToken )
23
23
{
24
- FileName = Path . GetTempFileName ( ) ;
24
+ FileName = Path . Combine ( Path . GetTempPath ( ) , Path . GetRandomFileName ( ) ) ;
25
25
File . WriteAllText ( FileName , content ) ;
26
26
27
27
// Because .NET finalizers don't reliably run when the process is terminating, also
You can’t perform that action at this time.
0 commit comments