mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-05 09:43:42 +08:00
904d16f517
Should fix the tests on macOS.
(cherry picked from commit 0d2c11249e
)
18 lines
542 B
Fish
18 lines
542 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 .
|
|
# There's an error, but we don't really care about the specific one.
|
|
$fish -c 'echo Look Ma! No crashing!' 2>/dev/null
|
|
#CHECK: Look Ma! No crashing!
|
|
|
|
# Careful here, Solaris' rm tests if the directory is in $PWD, so we need to cd back
|
|
cd $oldpwd
|
|
rmdir $tmpdir
|