From d33131cd78e23bcce598195dd67f42ea47f8d140 Mon Sep 17 00:00:00 2001 From: itadmin Date: Tue, 29 Jun 2021 19:44:18 +0000 Subject: [PATCH] Support spaces in the editor path --- base/Edit-TextFile.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/Edit-TextFile.ps1 b/base/Edit-TextFile.ps1 index ffdb1dc..c57bfdb 100644 --- a/base/Edit-TextFile.ps1 +++ b/base/Edit-TextFile.ps1 @@ -39,6 +39,6 @@ end { if( $Path ) { $arguments = "$arguments" } if( $PSCmdlet.ShouldProcess( "Edit ($editor): $arguments" ) ) { - Invoke-ExpressionEx -sudo:$sudo $editor "$arguments" + Invoke-ExpressionEx -sudo:$sudo "& `"$editor`"" "$arguments" } } \ No newline at end of file