Skip to content

Commit

Permalink
CHE-622 Do not import templates commands if user is providing its own…
Browse files Browse the repository at this point in the history
… location

Change-Id: I603080bb67ef9bc8b64c80c06ef47ada3dfb6bfe
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
  • Loading branch information
benoitf committed Feb 27, 2016
1 parent fd8f022 commit 42e1e28
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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) => {
Expand Down

0 comments on commit 42e1e28

Please sign in to comment.