Page MenuHomePhabricator

D18141.diff
No OneTemporary

D18141.diff

diff --git a/src/console/PhutilInteractiveEditor.php b/src/console/PhutilInteractiveEditor.php
--- a/src/console/PhutilInteractiveEditor.php
+++ b/src/console/PhutilInteractiveEditor.php
@@ -260,18 +260,16 @@
return $editor;
}
- // Look for `editor` in PATH, some systems provide an editor which is
- // linked to something sensible.
- if (Filesystem::binaryExists('editor')) {
- return 'editor';
- }
-
if ($this->fallback) {
return $this->fallback;
}
- if (Filesystem::binaryExists('nano')) {
- return 'nano';
+ $candidates = array('editor', 'nano', 'sensible-editor', 'vi');
+
+ foreach ($candidates as $cmd) {
+ if (Filesystem::binaryExists($cmd)) {
+ return $cmd;
+ }
}
throw new Exception(

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 28, 11:36 PM (6 h, 48 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6802789
Default Alt Text
D18141.diff (789 B)

Event Timeline