Skip to content

Commit 13c955a

Browse files
author
Vladimir Enchev
committed
SHA updated
1 parent 974a6df commit 13c955a

File tree

4 files changed

+14
-16
lines changed

4 files changed

+14
-16
lines changed

lib/services/platform-service.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,8 @@ export class PlatformService implements IPlatformService {
268268
sourceFiles = sourceFiles.filter(source => !minimatch(source, `**/${constants.TNS_MODULES_FOLDER_NAME}/**`, { nocase: true }));
269269
}
270270

271-
// Verify .xml files are well-formed. If not valid stop the transfer.
272-
if(!this.$xmlValidator.validateXmlFiles(sourceFiles).wait()){
273-
this.$errors.failWithoutHelp("Invalid or not well-formed XML files detected!");
274-
return false;
275-
}
271+
// Verify .xml files are well-formed.
272+
this.$xmlValidator.validateXmlFiles(sourceFiles).wait();
276273

277274
// Remove .ts and .js.map files
278275
constants.LIVESYNC_EXCLUDED_FILE_PATTERNS.forEach(pattern => sourceFiles = sourceFiles.filter(file => !minimatch(file, pattern, { nocase: true })));

test/ios-project-service.ts

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ function createTestInjector(projectPath: string, projectName: string): IInjector
8282
testInjector.register("xcprojService", {});
8383
testInjector.register("pluginVariablesService", PluginVariablesService);
8484
testInjector.register("pluginVariablesHelper", PluginVariablesHelper);
85+
testInjector.register("androidProcessService", {});
8586
return testInjector;
8687
}
8788

test/platform-service.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -336,16 +336,16 @@ describe('Platform Service Tests', () => {
336336

337337
platformService = testInjector.resolve("platformService");
338338
let oldLoggerWarner = testInjector.resolve("$logger").warn;
339-
let warnings: string = "";
340-
try {
341-
testInjector.resolve("$logger").warn = (text: string) => warnings += text;
342-
platformService.preparePlatform("android").wait();
343-
} finally {
344-
testInjector.resolve("$logger").warn = oldLoggerWarner;
345-
}
346-
347-
// Asserts that prepare has caught invalid xml
348-
assert.isFalse(warnings.indexOf("has errors") !== -1);
339+
let warnings: string = "";
340+
try {
341+
testInjector.resolve("$logger").warn = (text: string) => warnings += text;
342+
platformService.preparePlatform("android").wait();
343+
} finally {
344+
testInjector.resolve("$logger").warn = oldLoggerWarner;
345+
}
346+
347+
// Asserts that prepare has caught invalid xml
348+
assert.isFalse(warnings.indexOf("has errors") !== -1);
349349
});
350350
});
351351
});

0 commit comments

Comments
 (0)