Skip to content

Commit 0c9669e

Browse files
author
Vladimir Enchev
committed
SHA updated
1 parent 974a6df commit 0c9669e

File tree

4 files changed

+5
-17
lines changed

4 files changed

+5
-17
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

+1-11
Original file line numberDiff line numberDiff line change
@@ -335,17 +335,7 @@ describe('Platform Service Tests', () => {
335335
projectData.projectDir = tempFolder;
336336

337337
platformService = testInjector.resolve("platformService");
338-
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);
338+
assert.throws(() => platformService.preparePlatform("android").wait());
349339
});
350340
});
351341
});

0 commit comments

Comments
 (0)