Skip to content

Commit

Permalink
Added check for old "export format"
Browse files Browse the repository at this point in the history
See #115
  • Loading branch information
lptr committed Nov 4, 2014
1 parent 9cb6afa commit f4bceb6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.prezi.gradle.pride.cli.commands.actions;

import com.google.common.base.Strings;
import com.prezi.gradle.pride.Pride;
import com.prezi.gradle.pride.PrideException;
import com.prezi.gradle.pride.RuntimeConfiguration;
Expand Down Expand Up @@ -46,6 +47,11 @@ public static InitActionFromImportedConfig create(File prideDirectory, RuntimeCo
}

ConfigurationData<ExportedModule> configurationData = new ExportedConfigurationHandler(vcsManager).loadConfiguration(importedConfig);
for (ExportedModule exportedModule : configurationData.getModules()) {
if (Strings.isNullOrEmpty(exportedModule.getRemote())) {
throw new PrideException("No remote URL specified for module " + exportedModule.getName() + ". Please use `pride export` to generate a configuration that can be imported.");
}
}
return new InitActionFromImportedConfig(prideDirectory, globalConfig, configurationData.getConfiguration(), configurationData.getModules(), vcsManager, useRepoCache, noRepoCache, recursive);
}

Expand Down

0 comments on commit f4bceb6

Please sign in to comment.