diff --git a/ng-dev/auth/shared/ng-dev-token.ts b/ng-dev/auth/shared/ng-dev-token.ts index 0958af13c..aa5513d4e 100644 --- a/ng-dev/auth/shared/ng-dev-token.ts +++ b/ng-dev/auth/shared/ng-dev-token.ts @@ -106,7 +106,11 @@ async function saveTokenToFileSystem(data: NgDevUserWithToken) { /** Retrieve the token from the file system. */ async function retrieveTokenFromFileSystem(): Promise { - if (!(await stat(tokenPath))) { + try { + if (!(await stat(tokenPath))) { + return null; + } + } catch { return null; }