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
(cherry picked from commit 22a3251)
  • Loading branch information
jbedard authored and clydin committed Aug 11, 2022
1 parent 0cc5b4d commit ea91854
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/legacy-cli/e2e/utils/assets.ts
@@ -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 ea91854

Please sign in to comment.