Skip to content

Commit 9ec0f95

Browse files
author
Daniel Del Core
committed
Wrap errors in process.env for remote testing
1 parent eac5207 commit 9ec0f95

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/heavy-papayas-visit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@codeshift/fetcher': patch
3+
---
4+
5+
Adds development logging for quick debugging

packages/fetcher/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ export async function fetchRemotePackage(
117117
}
118118
} catch (e) {
119119
// Swallow this error
120+
if (process.env.NODE_ENV !== 'production') {
121+
console.error('Remote package config parsing error:');
122+
console.error(e);
123+
}
120124
}
121125

122126
return await fetchConfig(info.location);

0 commit comments

Comments
 (0)