[Bug 1194800] Re: cd flibbleflob/.. works when it shouldn't

David Jones drj at pobox.com
Wed Jul 3 17:10:16 UTC 2013


#2 I read 8.b.ii. Right after I read 8.b.i which says:

"""
If the preceding component does not refer (in the context of pathname resolution with symbolic links followed) to a directory, then the cd utility shall display an appropriate error message and no further steps shall be taken.
"""

So my interpretation is that POSIX mandates an error in this case.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dash in Ubuntu.
https://bugs.launchpad.net/bugs/1194800

Title:
  cd flibbleflob/.. works when it shouldn't

Status in “dash” package in Ubuntu:
  Confirmed

Bug description:
  Consider the script:

      cd flibbleflob/.. 2> /dev/null || echo splat

  (Assuming that the flibbleflob directory does not exist) the 'cd'
  should fail and so "splat" should be sent to stdout.  And on bash it
  is:

      bash -c 'cd flibbleflob/.. 2> /dev/null || echo splat'
      splat

  But with dash, no output:

      dash -c 'cd flibbleflob/.. 2> /dev/null || echo splat'

  disappoint.

  drj$ lsb_release -rd
  Description:	Ubuntu 13.04
  Release:	13.04

  drj$ apt-cache policy dash
  dash:
    Installed: 0.5.7-3ubuntu1
    Candidate: 0.5.7-3ubuntu1
    Version table:
   *** 0.5.7-3ubuntu1 0
          500 http://gb.archive.ubuntu.com/ubuntu/ raring/main amd64 Packages
          100 /var/lib/dpkg/status

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/1194800/+subscriptions




More information about the foundations-bugs mailing list