question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

peru behaves differently when called from a sub-directory (where peru.yaml is located)

See original GitHub issue

Hi,

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.

  1. I change the working directory to /dir0/dir1
  2. 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.
  3. Now I delete one or more random files from the common directory by hand.
  4. 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.
  5. I change the working directory to the parent /dir0 and do exactly the same as before and call peru 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:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
oconnor663commented, Dec 17, 2020

Ok all done, version 1.2.1 is out.

1reaction
Tweakbertcommented, Dec 2, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

buildinspace/peru: a generic package manager, for ... - GitHub
Also accepts globs. export : A subdirectory that peru should treat as the root of the module tree. Everything else is dropped, including...
Read more >
peru · PyPI
Peru is a tool for including other people's code in your projects. It's a lot like git submodules, except that peru stays out...
Read more >
Untitled
Bbc programmes sunday evening, Karwa driving school location, Rubens namam rizek ... Subdirectory multisite drupal 7, Lagrangian holonomic constraints, ...
Read more >
8 steps to developing an Ansible role in Linux - Red Hat
In this article, I convert the original playbook vim-config.yaml into a ... it looks for a file named main.yml in the tasks subdirectory...
Read more >
Running integration tests in Kubernetes - Opensource.com
Verify how your application behaves with your full solution stack by ... Kubernetes (K8s) is currently the most well-known solution for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found