Skip to content

Commit a84833f

Browse files
committed
t2025: Tell tail explicitly to read from stdin
Our current version of bash 3.1.17(5) can not parse the following snippet correctly p=abcd abspath=/$p subdir="x$(echo "$p" | tail -c $((253 - ${#abspath})))" as it returns tail: cannot open `253' for reading: No such file or directory This is fixed in bash 3.1.20(4), I did not check earlier versions. Signed-off-by: Thomas Braun <[email protected]>
1 parent 01a6f1b commit a84833f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t2025-checkout-long-paths.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ test_set_prereq SHORTABSPATH
6363
test_expect_success SHORTABSPATH 'clean up path close to MAX_PATH' '
6464
p=/123456789abcdef/123456789abcdef/123456789abcdef/123456789abc/ef &&
6565
p=y$p$p$p$p &&
66-
subdir="x$(echo "$p" | tail -c $((253 - ${#abspath})))" &&
66+
subdir="x$(echo "$p" | tail -c $((253 - ${#abspath})) - )" &&
6767
# Now, $abspath/$subdir has exactly 254 characters, and is inside CWD
6868
p2="$abspath/$subdir" &&
6969
test 254 = ${#p2} &&

0 commit comments

Comments
 (0)