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.

How to run on multiple directories

See original GitHub issue

I have a monorepo and want run linter on dir1 and dir2. How can I do it?

working-directory: dir1 dir2

doesn’t work:

working-directory (dir1  dir2) was not a path

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:10
  • Comments:5

github_iconTop GitHub Comments

15reactions
ChrisSargentcommented, Jul 19, 2021

I also have this question.

We have a mixed codebase like:

packages
- Go
- -- cmd
- ---- module1
- ---- module2
- Typescript

Currently, we run linting locally with a command like this from the ‘Go’ directory: find . -type f -name go.mod -maxdepth 3 -execdir golangci-lint run --fast \;

I have tried a few times to set it up in a better way but I always end up hitting the ‘there are no go files error’.

Is there a way to install this action (so we get all the right installations and caches) but use a custom command to run?

1reaction
KEINOScommented, Dec 12, 2022

@serbrech

I thought so too. But since the directory begins with “_”, it omits from “./…” unless specifying them. It took me time to find it out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Execute a Command in Multiple Directories on Linux - Baeldung
Learn how to execute the same command inside multiple directories in Linux.
Read more >
How to execute a bash script on multiple directories?
Try this curdir=$(pwd) for folder in /path/to/Files/*; do [ -d "$folder" ] && cd "$folder" && ./conv.sh done cd $curdir.
Read more >
How do you execute a SHELL script in multiple directories ...
Try using a for loop. In this example you need to run the command from /home/aero ...
Read more >
Copy a File To Multiple Directories With A Single Command ...
One way to copy a file to multiple directories is to use the xargs command. This command takes a list of arguments and...
Read more >
5 examples to create multiple directories in Linux
We showed 5 different examples or use cases on how to create multiple directories in linux with the mkdir tool by running a...
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