Skip to content

Commit

Permalink
fix(public/fs): guarantees utils src/dest resolver callbacks run seri…
Browse files Browse the repository at this point in the history
…ally
  • Loading branch information
rafamel committed May 21, 2019
1 parent 333cb26 commit 8111110
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/public/fs/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable eqeqeq */
import fs from 'fs-extra';
import path from 'path';
import { series } from 'promist';
import { absolute, exists } from '~/utils/file';
import logger from '~/utils/logger';
import { IFsReadOptions, TDestination } from './types';
Expand Down Expand Up @@ -56,7 +57,7 @@ export async function resolver<T>(
return { source, destination };
});

return Promise.all(
items.map(({ source, destination }) => fn(source, destination))
return series.map(items, ({ source, destination }) =>
fn(source, destination)
);
}

0 comments on commit 8111110

Please sign in to comment.