CHE-622 Do not import templates commands if user is providing its own location

Change-Id: I603080bb67ef9bc8b64c80c06ef47ada3dfb6bfe
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
6.19.x
Florent BENOIT 2016-02-26 18:11:22 +01:00
parent fd8f0225c5
commit 42e1e28e27
1 changed files with 7 additions and 0 deletions

View File

@ -447,6 +447,11 @@ export class CreateProjectCtrl {
} else if (projectData.source.location.length > 0) {
// if it's a user-defined location we need to cleanup commands that may have been configured by templates
if (this.selectSourceOption === 'select-source-existing') {
projectData.project.commands = [];
}
// websocket channel
channel = 'importProject:output:' + workspaceId + ':' + projectName;
@ -469,6 +474,8 @@ export class CreateProjectCtrl {
let commands = projectData.project.commands;
if (commands && commands.length > 0) {
this.addCommand(workspaceId, projectName, commands, 0, deferredAddCommand);
} else {
deferredAddCommand.resolve('no commands to add');
}
deferredImport.resolve();
}, (error) => {