Skip to content

Commit

Permalink
More verbose logs
Browse files Browse the repository at this point in the history
  • Loading branch information
aleks-tpom6oh committed Feb 16, 2024
1 parent a8b8f37 commit f27dcba
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1471,23 +1471,24 @@ function status(source: string, json, argv: any): void {
results
.filter((result) => !result.startsWith('.git'))
.map((resultPath) =>
pify(fs.lstat)(resultPath).then((stats) => {
if (stats.isSymbolicLink()) {
return [];
}
return pify(fs.readFile)(resultPath, 'utf8').then((data) => [
resultPath,
data,
]).catch((error) => {
pify(fs.lstat)(resultPath)
.then((stats) => {
if (stats.isSymbolicLink()) {
return [];
}
return pify(fs.readFile)(resultPath, 'utf8')
.then((data) => [resultPath, data])
.catch((error) => {
if (argv.verbose) {
report.warn(`Failed to parse file: ${resultPath}`, error);
}
});
})
.catch((error) => {
if (argv.verbose) {
report.warn(`Failed to parse file: ${resultPath}`, error);
report.warn(`Failed to read file stats: ${resultPath}`, error);
}
});
}).catch((error) => {
if (argv.verbose) {
report.warn(`Failed to read file stats: ${resultPath}`, error);
};
})
}),
),
).then((cachePairs) => Object.fromEntries(cachePairs)),
);
Expand Down

0 comments on commit f27dcba

Please sign in to comment.