Closed
Bug 1156388
Opened 9 years ago
Closed 9 years ago
Commit message validation hook errors out if EDITOR environment variable is not set
Categories
(Input :: General, defect)
Input
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: lgp171188, Assigned: willkg)
Details
(Whiteboard: u=contributor c=codequality p=1 s=input.2015q2)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.6.0 Build ID: 20150331233809 Steps to reproduce: Do a commit in the vagrant VM without having the EDITOR environment variable set Actual results: Linting the commit message... Traceback (most recent call last): File "./bin/lint_commit_msg.py", line 142, in <module> editor = os.environ['EDITOR'] File "/home/vagrant/.virtualenvs/fjordvagrant/lib/python2.7/UserDict.py", line 23, in __getitem__ raise KeyError(key) KeyError: 'EDITOR' Expected results: Should have caught the exception and instead used an editor known to be installed on a Linux system like nano or vi.
Reporter | ||
Comment 1•9 years ago
|
||
On Debian/Ubuntu systems, using /usr/bin/editor would have been a good workaround.
Reporter | ||
Comment 2•9 years ago
|
||
As discussed on #input, asking the user to set the EDITOR environment variable if it doesn't exist instead of erroring out would be a good fix to this issue.
Assignee | ||
Comment 3•9 years ago
|
||
We talked about this on IRC. I'll fix it so that if EDITOR isn't in the environment, we'll get into the loop and treat it as if the user typed "i" for ignore. We'll tell the user to set EDITOR in the environment. We'll also walk the user through how to edit the commit message using "git commit --amend".
Assignee: nobody → willkg
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Whiteboard: u=contributor c=codequality p= s=input.2015q2
Assignee | ||
Comment 4•9 years ago
|
||
In a PR: https://github.com/mozilla/fjord/pull/548
Assignee | ||
Comment 5•9 years ago
|
||
Landed in: https://github.com/mozilla/fjord/commit/0576150681b1dda85ea5040a1a7c3b1f5c404702 This isn't related to server environments, so I'm closing it out.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: u=contributor c=codequality p= s=input.2015q2 → u=contributor c=codequality p=1 s=input.2015q2
You need to log in
before you can comment on or make changes to this bug.
Description
•