Re: [PATCH v2 3/3] config tests: fix harmless but broken "rm -r" cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

> diff --git a/t/t1300-config.sh b/t/t1300-config.sh
> index d3d9adbb3db..c6661e61af5 100755
> --- a/t/t1300-config.sh
> +++ b/t/t1300-config.sh
> @@ -2083,12 +2083,13 @@ test_expect_success '--show-scope with --show-origin' '
>  '
>  
>  test_expect_success 'override global and system config' '
> -	test_when_finished rm -f "$HOME"/.config/git &&
> -
> +	test_when_finished rm -f \"\$HOME\"/.gitconfig &&

This does look more correct than the original.

>  	cat >"$HOME"/.gitconfig <<-EOF &&
>  	[home]
>  		config = true
>  	EOF
> +
> +	test_when_finished rm -rf \"\$HOME\"/.config/git &&
>  	mkdir -p "$HOME"/.config/git &&
>  	cat >"$HOME"/.config/git/config <<-EOF &&
>  	[xdg]

Nicely done.  Will queue.

Thanks.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux