From 28959a3f31d8632975de4e18d0a0e47476b5a413 Mon Sep 17 00:00:00 2001 From: Anish Athalye Date: Wed, 17 Aug 2016 18:15:02 -0700 Subject: Fix user expansion in link source Previous to this patch, having a config like the following would not work properly: - link: ~/a: ~/b This was because the '~' was expanded on the left hand side (the link target), but not the right hand side (the link source). It was necessary to use a workaround like this: - link: ~/a: $HOME/b This was because variable expansion was being done, but user expansion was not being done. This commit adds support for using '~' in the link source. --- test/tests/link-environment-user-expansion-target.bash | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/tests/link-environment-user-expansion-target.bash (limited to 'test') diff --git a/test/tests/link-environment-user-expansion-target.bash b/test/tests/link-environment-user-expansion-target.bash new file mode 100644 index 0000000..9cb3424 --- /dev/null +++ b/test/tests/link-environment-user-expansion-target.bash @@ -0,0 +1,17 @@ +test_description='link expands user in target' +. '../test-lib.bash' + +test_expect_success 'setup' ' +echo "apple" > ~/f +' + +test_expect_success 'run' ' +run_dotbot <