Skip to content

Commit

Permalink
test: ensure test assets are writable when copied for use in e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jbedard authored and clydin committed Aug 11, 2022
1 parent 187ab7d commit 22a3251
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/legacy-cli/e2e/utils/assets.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { join } from 'path';
import { chmod } from 'fs/promises';
import glob from 'glob';
import { getGlobalVariable } from './env';
import { relative, resolve } from 'path';
Expand Down Expand Up @@ -33,7 +34,9 @@ export function copyAssets(assetName: string, to?: string) {
? resolve(getGlobalVariable('projects-root'), 'test-project', to, filePath)
: join(tempRoot, filePath);

return promise.then(() => copyFile(join(root, filePath), toPath));
return promise
.then(() => copyFile(join(root, filePath), toPath))
.then(() => chmod(toPath, 0o777));
}, Promise.resolve());
})
.then(() => tempRoot);
Expand Down

0 comments on commit 22a3251

Please sign in to comment.