Skip to content

Commit

Permalink
Merge pull request #253 from LinuxSuRen/latest-plugin
Browse files Browse the repository at this point in the history
Use latest as the default version of plugin
  • Loading branch information
oleg-nenashev authored Mar 26, 2020
2 parents 1a25d1c + 337b27d commit b842994
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,15 @@ private void postConstruct(CmdLineParser parser) throws IOException {
// This is a plugin list file
this.pluginsDir = Files.createTempDirectory("plugins").toFile();
for (String line : FileUtils.readLines(plugins_txt, UTF_8)) {
String shortname = line;
String version = "latest";

int i = line.indexOf(':');
String shortname = line.substring(0,i);
String version = line.substring(i+1);
if (i != -1) {
shortname = line.substring(0,i);
version = line.substring(i+1);
}

installPlugin(shortname, version);
}
}
Expand Down

0 comments on commit b842994

Please sign in to comment.