File tree Expand file tree Collapse file tree
packages/playwright/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 browser-entrypoint.html needs a URL the server can see, so we expose
66 packages/css/dist at /dist-css without copying or bundling.
77*/
8- import { lstat , symlink , unlink } from 'node:fs/promises'
8+ import { rm , symlink } from 'node:fs/promises'
99import path from 'node:path'
1010import { fileURLToPath } from 'node:url'
1111
@@ -15,18 +15,6 @@ const __dirname = path.dirname(__filename)
1515const targetPath = path . resolve ( __dirname , '../../css/dist' )
1616const linkPath = path . resolve ( __dirname , '../dist-css' )
1717
18- try {
19- const stat = await lstat ( linkPath )
20- if ( stat . isSymbolicLink ( ) || stat . isDirectory ( ) ) {
21- await unlink ( linkPath )
22- }
23- } catch ( error ) {
24- if ( error && typeof error === 'object' && 'code' in error ) {
25- const code = error . code
26- if ( code !== 'ENOENT' ) {
27- throw error
28- }
29- }
30- }
18+ await rm ( linkPath , { recursive : true , force : true } )
3119
3220await symlink ( targetPath , linkPath , 'junction' )
You can’t perform that action at this time.
0 commit comments