[
https://issues.apache.org/jira/browse/TINKERPOP3-858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14961094#comment-14961094
]
ASF GitHub Bot commented on TINKERPOP3-858:
-------------------------------------------
Github user mhfrantz commented on a diff in the pull request:
https://github.com/apache/incubator-tinkerpop/pull/110#discussion_r42271237
--- Diff:
gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/InstallCommand.groovy
---
@@ -53,6 +53,12 @@ class InstallCommand extends CommandSupport {
final def pluginsThatNeedRestart = grabDeps(dep)
return "Loaded: " + arguments + (pluginsThatNeedRestart.size()
== 0 ? "" : " - restart the console to use $pluginsThatNeedRestart")
} catch (Exception ex) {
+ if (!(ex instanceof IllegalStateException)) {
+ // IllegalStateException is thrown if a module with the
same name is already installed.
+ final def uninstall = new UninstallCommand(shell, mediator)
+ final List<String> module =
Collections.singletonList(artifact.getArtifact())
+ uninstall.execute(module)
--- End diff --
Can uninstall throw an exception?
> Cleanup after failed :install
> -----------------------------
>
> Key: TINKERPOP3-858
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-858
> Project: TinkerPop 3
> Issue Type: Improvement
> Components: console, server
> Affects Versions: 3.0.1-incubating
> Reporter: stephen mallette
> Assignee: Jason Plurad
> Priority: Minor
> Fix For: 3.1.0-incubating, 3.0.2-incubating
>
>
> If {{:install}} tanks:
> {code}
> gremlin> :install org.apache.tinkerpop hadoop-gremlin 3.1.0-SNAPSHOT
> ==>Error grabbing Grapes -- [download failed:
> io.netty#netty;3.6.2.Final!netty.jar(bundle)]
> {code}
> try to clean up the directory that gets created or else future attempts do
> this:
> {code}
> gremlin> :install org.apache.tinkerpop hadoop-gremlin 3.1.0-SNAPSHOT
> ==>a module with the name hadoop-gremlin is already installed
> {code}
> This is also a problem for {{bin/gremlin-server.sh -i}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)