Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14111986
D18141.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
789 B
Referenced Files
None
Subscribers
None
D18141.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D18141: Modernize editor selector
Attached
Detach File
Event Timeline
Log In to Comment