mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-14 09:53:42 +08:00
0d18fec890
It has a different error. We don't care, we expect an error.
(cherry picked from commit 7c879ed356
)
18 lines
479 B
Fish
18 lines
479 B
Fish
#RUN: %fish -C 'set -g fish %fish' %s
|
|
# Test that fish doesn't crash if cwd is unreadable at the start (#6597)
|
|
|
|
set -l oldpwd $PWD
|
|
set -l tmpdir (mktemp -d)
|
|
|
|
# $fish might be a relative path (e.g. "../test/root/bin/fish")
|
|
set -l fish (builtin realpath $fish)
|
|
cd $tmpdir
|
|
chmod 000 .
|
|
$fish -c 'echo Look Ma! No crashing!'
|
|
#CHECK: Look Ma! No crashing!
|
|
#CHECKERR: {{.*}}
|
|
|
|
# Careful here, Solaris' rm tests if the directory is in $PWD, so we need to cd back
|
|
cd $oldpwd
|
|
rmdir $tmpdir
|