Skip to content

Commit f33eca8

Browse files
tgriesserZachJW34
andauthored
fix: #22002 choikdar ignore EPERM issues (#22011)
* fix: #22002 choikdar ignore EPERM issues * fix unit test Co-authored-by: Zachary Williams <[email protected]>
1 parent 387202c commit f33eca8

File tree

5 files changed

+5
-0
lines changed

5 files changed

+5
-0
lines changed

packages/data-context/src/actions/DevActions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export class DevActions {
2121
if (!this._chokidar) {
2222
this._chokidar = chokidar.watch(DevActions.CY_STATE_PATH, {
2323
ignoreInitial: true,
24+
ignorePermissionErrors: true,
2425
})
2526

2627
this._chokidar.on('change', () => {

packages/data-context/src/data/ProjectConfigManager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ export class ProjectConfigManager {
338338
const w = chokidar.watch(file, {
339339
ignoreInitial: true,
340340
cwd: this.options.projectRoot,
341+
ignorePermissionErrors: true,
341342
})
342343

343344
this._watchers.add(w)

packages/data-context/src/sources/ProjectDataSource.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ export class ProjectDataSource {
331331
// ignored by config
332332
this._specWatcher = chokidar.watch('.', {
333333
ignoreInitial: true,
334+
ignorePermissionErrors: true,
334335
cwd: projectRoot,
335336
ignored: ['**/node_modules/**', ...excludeSpecPattern, ...additionalIgnorePattern],
336337
})

packages/data-context/src/sources/migration/codegen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export async function initComponentTestingMigration (
8181
const watcher = chokidar.watch(
8282
watchPaths, {
8383
cwd: projectRoot,
84+
ignorePermissionErrors: true,
8485
},
8586
)
8687

packages/data-context/test/unit/sources/ProjectDataSource.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ describe('startSpecWatcher', () => {
507507
ignoreInitial: true,
508508
cwd: projectRoot,
509509
ignored: ['**/node_modules/**', '**/ignore.spec.ts', 'additional.ignore.cy.js'],
510+
ignorePermissionErrors: true,
510511
})
511512

512513
expect(onStub).to.have.been.calledWith('all', handleFsChange)

0 commit comments

Comments
 (0)