fix: flatten directories array passed to globby
fixes run-staged-pkg globby call
This commit is contained in:
parent
5d4b22070f
commit
8bb9c18b9c
@ -113,13 +113,13 @@ const runLintAndGitAdd = async (staged, pkgs) => {
|
|||||||
const gather = async () => {
|
const gather = async () => {
|
||||||
const isDirectory = source => lstatSync(source).isDirectory();
|
const isDirectory = source => lstatSync(source).isDirectory();
|
||||||
const getDirectories = source =>
|
const getDirectories = source =>
|
||||||
readdirSync(source).map(name => join(source, name)).filter(isDirectory);
|
readdirSync(source)
|
||||||
|
.map(name => join(source, name))
|
||||||
|
.filter(isDirectory);
|
||||||
|
|
||||||
const locations = await globby(
|
const locations = await globby(
|
||||||
[getDirectories('./packages'), getDirectories('./prototypes')],
|
getDirectories('./packages').concat(getDirectories('./prototypes')),
|
||||||
{
|
{ cwd: ROOT }
|
||||||
cwd: ROOT
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const staged = (await getStaged())
|
const staged = (await getStaged())
|
||||||
|
Loading…
Reference in New Issue
Block a user