• 
      

    Clean handling of lack of $EDITOR

    Review Request #5790 — Created May 9, 2014 and submitted

    Information

    ji
    RBTools
    master
    b1b0048...

    Reviewers

    Summary: Clean handling of lack of $EDITOR.

    Problem: If EDITOR is not set, and vim is not installed, rbt post exits with just "CRITICAL: [Errno 2] No such file or directory" as an error message, which does not indicate where the problem lies nor how to solve it.

    Discussion: vim is not installed by default on many distributions, or is installed as "vi". Moreover, EDITOR is traditionally used for a line editor (remember those?), with VISUAL being the environment variable of choice for a full-screen or GUI editor. If neither is set, we should fall back to the editor most likely to be installed in the base distribution.

    Solution: Prefer $VISUAL over $EDITOR over "vi". Offer a helpful error message on failure.

    yes.

    david
    1. Ship It!

    2. 
        
    JI
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-0.6.x (cb12e5d)