Patchwork [3,of,4,contrib] contrib: fix a bug preventing editmergeps.ps1 from running unknonw editors

login
register
mail settings
Submitter Kostia Balytskyi
Date May 30, 2017, 1:28 p.m.
Message ID <46a10362e0504dacb224.1496150880@devvm1416.lla2.facebook.com>
Download mbox | patch
Permalink /patch/21064/
State Accepted
Headers show

Comments

Kostia Balytskyi - May 30, 2017, 1:28 p.m.
# HG changeset patch
# User Kostia Balytskyi <ikostia@fb.com>
# Date 1496150271 25200
#      Tue May 30 06:17:51 2017 -0700
# Node ID 46a10362e0504dacb224a5663794851e36095d77
# Parent  17fa785d74860249904628b153fa8d7b7c715042
contrib: fix a bug preventing editmergeps.ps1 from running unknonw editors

'$ executable' is not a way to run executable in powershell, '& executable'
is instead. Found this when testing with regular Windows notepad.

Patch

diff --git a/contrib/editmergeps.ps1 b/contrib/editmergeps.ps1
--- a/contrib/editmergeps.ps1
+++ b/contrib/editmergeps.ps1
@@ -65,7 +65,7 @@  if (($ed -eq "vim") -or ($ed -eq "emacs"
 }
 else
 {
-  $ "$ed" $file
+  & "$ed" $file
 }
 
 $conflicts=Get-Lines