mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-13 01:03:47 +08:00
105a256e5a
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 See1ee57e9244
Fixes #6555 Fixes #6558 (cherry picked from commit9cbd3d57a0
)
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
|