Skip to content

Commit 0dbb616

Browse files
committed
Handle non interactive console in doctor-service
1 parent 3522050 commit 0dbb616

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/services/doctor-service.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@ class DoctorService implements IDoctorService {
116116
}
117117

118118
private printInfosCore(infos: NativeScriptDoctor.IInfo[]): void {
119+
if (!helpers.isInteractive()) {
120+
infos.map(info => {
121+
let message = info.message;
122+
if (info.type === constants.WARNING_TYPE_NAME) {
123+
message = `WARNING: ${info.message.yellow} ${EOL} ${info.additionalInformation} ${EOL}`;
124+
}
125+
this.$logger.out(message);
126+
});
127+
}
128+
119129
infos.filter(info => info.type === constants.INFO_TYPE_NAME)
120130
.map(info => {
121131
const spinner = this.$terminalSpinnerService.createSpinner();

0 commit comments

Comments
 (0)