Skip to content

Commit 4270a98

Browse files
committed
feat: add "show logs" button on warning notifications
1 parent df67308 commit 4270a98

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/utils.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,12 @@ export function logError(message: string, error?: unknown) {
125125

126126
export function promptWarn(message: string) {
127127
log.warn(message)
128-
showMessage(message)
128+
showMessage(message, 'Show logs')
129+
.then((result) => {
130+
if (result === 'Show logs') {
131+
log.show()
132+
}
133+
})
129134
}
130135

131136
export async function showMessage<T extends string[]>(

0 commit comments

Comments
 (0)