mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-04 17:59:56 +08:00

Solaris/OpenIndiana/Illumos `rm` checks that and errors out. In these cases we don't actually need it to be a part of $PWD as it's just for cleanup, so we `cd` out before. See #5472 See 1ee57e92447781b5ff79aaa7c55f6468fc84a37d Fixes #6555 Fixes #6558 (cherry picked from commit 9cbd3d57a01ba8f4813febff83210f595518cea1)
18 lines
319 B
Fish
18 lines
319 B
Fish
# RUN: %fish %s
|
|
|
|
# Ensure that, if variable expansion results in multiple strings
|
|
# and one of them fails a glob, that we don't fail the entire expansion.
|
|
set -l oldpwd (pwd)
|
|
set dir (mktemp -d)
|
|
cd $dir
|
|
mkdir a
|
|
mkdir b
|
|
touch ./b/file.txt
|
|
|
|
set dirs ./a ./b
|
|
echo $dirs/*.txt
|
|
# CHECK: ./b/file.txt
|
|
|
|
cd $oldpwd
|
|
rm -Rf $dir
|