How to run on multiple directories
See original GitHub issueI 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:
- Created 2 years ago
- Reactions:10
- Comments:5
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I also have this question.
We have a mixed codebase like:
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?
@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.