Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jun 2012 22:32:32 -0700 (PDT)
From:      "Ronald F.Guilmette" <rfg@tristatelogic.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/169256: /bin/sh provides crummy diagnositic when cd fails
Message-ID:  <20120620053232.7905B5081B@segfault.tristatelogic.com>
Resent-Message-ID: <201206200550.q5K5o88e098827@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         169256
>Category:       bin
>Synopsis:       /bin/sh provides crummy diagnositic when cd fails
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 20 05:50:07 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Ronald F. Guilmette
>Release:        FreeBSD 8.3-RELEASE amd64
>Organization:
entropy
>Environment:

8.3-RELEASE amd64

>Description:

If you are running /bin/sh and you try to `cd' into a non-existant directory
(or one that you are not allowed to cd into, due to permissions) then /bin/sh
gives you the following unhelpful diagnostic:

	cd: can't cd to craponarope

(Here, the the directory name "craponarope" is just used as an example.)

I checked and both csh and bash give much more helpful diagnostics when
attempting to perform the same operation, i.e. :

	No such file or directory

In my opinion, /bin/sh should provide that more helpful diagnostic.

>How-To-Repeat:

	/bin/sh
	cd some-nonexistant-directory

>Fix:

I have not looked at the source, but I imagine that the fix should be
fairly trivial.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120620053232.7905B5081B>