contrib: make editmergeps able to work with Windows GUI editors
authorKostia Balytskyi <ikostia@fb.com>
Fri, 19 May 2017 17:00:55 -0700
changeset 32344 864fc285d10a
parent 32343 d47d7d3bd07b
child 32345 a438f5a3bc09
contrib: make editmergeps able to work with Windows GUI editors Using Start-Process -Wait makes it wait until the process finishes, which is necesssary for Windows GUI applications. My short testing also demonstrated that it does not hurt with command line vim.
contrib/editmergeps.ps1
--- a/contrib/editmergeps.ps1	Sat Jan 09 23:24:52 2016 +0900
+++ b/contrib/editmergeps.ps1	Fri May 19 17:00:55 2017 -0700
@@ -46,7 +46,7 @@
   # or the user stops editing the file
   while (($firstline -ne $nil) -and ($firstline -ne $previousline))
   {
-    & "$ed" "+$firstline" "$file"
+    Start-Process -Wait $ed $linearg,$file
     $previousline = $firstline
     $lines = Get-Lines
     $firstline = if ($lines.Length -gt 0) { $lines[0] } else { $nil }