[xmonad] Issue 547 in xmonad: XMonad.Prompt.Shell does not open a prompt if a directory in PATH is inaccessible

codesite-noreply at google.com codesite-noreply at google.com
Sun Jun 16 00:50:13 CEST 2013


Status: New
Owner: ----

New issue 547 by ttue... at gmail.com: XMonad.Prompt.Shell does not open a  
prompt if a directory in PATH is inaccessible
http://code.google.com/p/xmonad/issues/detail?id=547

What steps will reproduce the problem?
1. Add a directory to PATH that user does not have permission to access.
2. Try to open a shell prompt.

What is the expected output? What do you see instead?
The prompt does not appear. I would expect a prompt to open, although tab  
completion obviously will not know about commands below the inaccessible  
directory.

What version of the product are you using? On what operating system?
xmonad-0.11, xmonad-contrib-0.11.1

Solution:
If a directory in the PATH is inaccessible, getDirectoryContents will throw  
an exception. The exception prevents the tab completion list from being  
compiled and the prompt from being opened. If an exception is encountered  
accessing any element of PATH for any reason, I think the response should  
simply be to return an empty list of commands for that element. I am  
attaching a patch that does exactly that.


Attachments:
	catch-exceptions-when-finding-commands-on-path-in-prompt_shell.dpatch  8.8  
KB

-- 
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings



More information about the xmonad mailing list