File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import * as helpers from "../common/helpers";
88import * as semver from "semver" ;
99import * as minimatch from "minimatch" ;
1010import Future = require( "fibers/future" ) ;
11+ import { EOL } from "os" ;
1112
1213export class PlatformService implements IPlatformService {
1314 private static TNS_MODULES_FOLDER_NAME = "tns_modules" ;
@@ -179,15 +180,20 @@ export class PlatformService implements IPlatformService {
179180 . forEach ( file => {
180181 let fileContents = this . $fs . readText ( file ) . wait ( ) ;
181182 let hasErrors = false ;
182- let domErrorHandler = ( level :any , msg :string ) => hasErrors = true ;
183+ let errorOutput = "" ;
184+ let domErrorHandler = ( level :any , msg :string ) => {
185+ errorOutput += level + EOL + msg + EOL ;
186+ hasErrors = true ;
187+ } ;
183188 let parser = new DomParser ( {
184189 locator :{ } ,
185190 errorHandler : domErrorHandler
186191 } ) ;
187192 parser . parseFromString ( fileContents , "text/xml" ) ;
188193 xmlHasErrors = xmlHasErrors || hasErrors ;
189194 if ( xmlHasErrors ) {
190- this . $logger . out ( "Error: " . red . bold + file + " has syntax errors." . red . bold ) ;
195+ this . $logger . warn ( `${ file } has syntax errors.` ) ;
196+ this . $logger . out ( errorOutput ) ;
191197 }
192198 } ) ;
193199 return ! xmlHasErrors ;
You can’t perform that action at this time.
0 commit comments