Skip to content

Commit 660e415

Browse files
committed
chore(build): Throw if rsync fails
1 parent ee43263 commit 660e415

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

scripts/rollup/build-all-release-channels.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,19 @@ if (process.env.CIRCLE_NODE_TOTAL) {
6464
// will have already removed conflicting files.
6565
//
6666
// In CI, merging is handled automatically by CircleCI's workspace feature.
67-
spawnSync('rsync', ['-ar', experimentalDir + '/', stableDir + '/']);
67+
const {error} = spawnSync('rsync', [
68+
'-ar',
69+
experimentalDir + '/',
70+
stableDir + '/',
71+
]);
72+
if (error !== undefined) {
73+
if (error.code === 'ENOENT') {
74+
throw new Error(
75+
`${process.argv[1]} needs the \`rsync\` CLI installed to work.`
76+
);
77+
}
78+
throw error;
79+
}
6880

6981
// Now restore the combined directory back to its original name
7082
// TODO: Currently storing artifacts as `./build2` so that it doesn't conflict

0 commit comments

Comments
 (0)