Skip to content

Commit d81060c

Browse files
(ci) asyncfy the copy command
1 parent f05a0f5 commit d81060c

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

scripts/docs-copy/flags-api-docs.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ const fse = require("fs-extra");
44
const origin = path.join(__dirname, "../../packages/support-flags/docs");
55
const target = path.join(__dirname, "../../docs/flags");
66

7+
async function main() {
8+
await fse.copy(origin, target, { overwrite: true });
9+
}
10+
711
if (require.main === module) {
8-
fse.copySync(origin, target, { overwrite: true }, function (err) {
9-
if (err) {
10-
console.error(err);
11-
} else {
12-
}
13-
});
12+
main();
1413
}

0 commit comments

Comments
 (0)