File tree 1 file changed +8
-2
lines changed
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";
8
8
import * as semver from "semver" ;
9
9
import * as minimatch from "minimatch" ;
10
10
import Future = require( "fibers/future" ) ;
11
+ import { EOL } from "os" ;
11
12
12
13
export class PlatformService implements IPlatformService {
13
14
private static TNS_MODULES_FOLDER_NAME = "tns_modules" ;
@@ -179,15 +180,20 @@ export class PlatformService implements IPlatformService {
179
180
. forEach ( file => {
180
181
let fileContents = this . $fs . readText ( file ) . wait ( ) ;
181
182
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
+ } ;
183
188
let parser = new DomParser ( {
184
189
locator :{ } ,
185
190
errorHandler : domErrorHandler
186
191
} ) ;
187
192
parser . parseFromString ( fileContents , "text/xml" ) ;
188
193
xmlHasErrors = xmlHasErrors || hasErrors ;
189
194
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 ) ;
191
197
}
192
198
} ) ;
193
199
return ! xmlHasErrors ;
You can’t perform that action at this time.
0 commit comments