peru behaves differently when called from a sub-directory (where peru.yaml is located)
See original GitHub issueHi,
I experience a different behaviour when peru is called from the same directory as the peru.yaml file compared to when it is called from a sub-directory. I am using peru on Windows 10, I only have peru V1.2.0 installed.
To my understanding, when e.g. peru sync
is executed from the command shell and peru.yaml can not be found in the current working directory, peru iterates through the parent directories, until either a peru.yaml file is found or there are no more parent directories that can be checked (root).
This works basically, but the behaviour I experience when calling peru from the directory containing peru.yaml is different from when I do the same call from a sub-directory.
Here’s a simple example to reproduce the behaviour:
I expected that when I call peru sync
with the following peru.yaml file, that all the contents in the head revision of the specified repository/subdirectory would be imported into a new generated sub-directory called common. This sub-directory will be created in the folder where peru.yaml is located.
imports:
txtTest: common
svn module txtTest:
url: https://<someRepoPath>/dir1_bornRev32
Before trying to reproduce the behaviour, I noticed that it is always a good idea to delete the .peru directory.
Let’s assume a directory tree with dir0
. This directory contains peru.yaml and the sub-directory dir1
.
- I change the working directory to
/dir0/dir1
- I execute
peru sync
. It returns without error and successfully creates the sub-directory dir0/common and imports all the files from url:https://<someRepoPath>/dir1_bornRev32
, as it should. - Now I delete one or more random files from the common directory by hand.
- I I execute
peru sync
again from/dir0/dir1
expecting it will re-import the files I just deleted. It executes without returning an error just like before, but it did not import the files I just deleted. - I change the working directory to the parent
/dir0
and do exactly the same as before and callperu sync
again. Again peru returns without an error just like before, but now the files I deleted before have been re-imported again.
I assume that the behaviour pointed out in 4. is not desired. Could you have a look at it? Thank you in advance.
Best Regards, Tweakbert
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
Ok all done, version 1.2.1 is out.
Thank you for the quick fix, but I won’t be able to check it before tomorrow. I will let you know as soon as possible.