Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

fix: Address startup failure from file access errors #379

Merged

Conversation

DominicKramer
Copy link
Contributor

fixes: #377

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 14, 2017
@DominicKramer DominicKramer requested a review from a team December 18, 2017 18:28
@@ -294,6 +294,9 @@ export class Debuglet extends EventEmitter {
try {
fileStats = await scanner.scan(
!id, that.config.workingDirectory, /.js$|.map$/);
fileStats.errors().forEach(err => {

This comment was marked as spam.

This comment was marked as spam.

reject(error);
}
else {
let d: string|undefined;

This comment was marked as spam.

This comment was marked as spam.

@@ -0,0 +1 @@
This file cannot be read.

This comment was marked as spam.

This comment was marked as spam.

Copy link
Contributor

@ofrobots ofrobots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM w/ nit.

@@ -444,6 +447,73 @@ describe('Debuglet', () => {
debuglet.start();
});

it('should not fail if files cannot be read', (done) => {
const MOCKED_DIRECTORY = process.cwd();
const errors: Array < {

This comment was marked as spam.

@DominicKramer DominicKramer merged commit 5c93c44 into googleapis:master Dec 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GKE: Error scanning the filesystem
3 participants