Thread (20 messages) flat view 20 messages, 3 authors, 2016-06-15
DORMANTno replies

[PATCH 07/10] t7300: fix clean up on Windows

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:46:25
Subsystem: the rest · Maintainer: Linus Torvalds

From: Johannes Schindelin <redacted>

On Windows, you cannot remove files that are in use, not even with
'rm -rf'.  So we need to run 'exec <foo/bar' inside a subshell lest
removing the whole test repository fail.

Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Johannes Sixt <redacted>
---
 t/t7300-clean.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index 1636fac..929d5d4 100755
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
@@ -373,9 +373,9 @@ test_expect_success 'removal failure' '
 
 	mkdir foo &&
 	touch foo/bar &&
-	exec <foo/bar &&
-	chmod 0 foo &&
-	test_must_fail git clean -f -d
+	(exec <foo/bar &&
+	 chmod 0 foo &&
+	 test_must_fail git clean -f -d)
 
 '
 chmod 755 foo
-- 
1.6.2.1.224.g2225f
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help