From 44e1763396b1986db660137621dc0f1c32eaf510 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Mon, 3 Aug 2020 18:19:35 +0100 Subject: [PATCH] Fix stupid issue with Send-0x0 --- posh/Microsoft.PowerShell_profile.ps1 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/posh/Microsoft.PowerShell_profile.ps1 b/posh/Microsoft.PowerShell_profile.ps1 index 556ce75..63f27e3 100644 --- a/posh/Microsoft.PowerShell_profile.ps1 +++ b/posh/Microsoft.PowerShell_profile.ps1 @@ -45,7 +45,7 @@ function Send-0x0 { $httpClientHandler = New-Object System.Net.Http.HttpClientHandler $httpClient = New-Object System.Net.Http.Httpclient $httpClientHandler - $packageFileStream = New-Object System.IO.FileStream @($File, [System.IO.FileMode]::Open) + $packageFileStream = New-Object System.IO.FileStream @((Resolve-Path $File), [System.IO.FileMode]::Open) $contentDispositionHeaderValue = New-Object System.Net.Http.Headers.ContentDispositionHeaderValue "form-data" $contentDispositionHeaderValue.Name = "file" @@ -74,7 +74,7 @@ function Send-0x0 { throw [System.Net.Http.HttpRequestException] $errorMessage } $responseBody = $response.Content.ReadAsStringAsync().Result - return $responseBody + return "URL: {0}" -f $responseBody } catch [Exception] { $PSCmdlet.ThrowTerminatingError($_) @@ -92,8 +92,6 @@ function Send-0x0 { END { } } - - $DotFilesPath = Join-Path $HOME '.dotfiles' $DotFilesAutodetect = $true $DotFilesAllowNestedSymlinks = $true