chanjarster commented on a change in pull request #70: [SCB-1663] add scripts
URL: https://github.com/apache/servicecomb-toolkit/pull/70#discussion_r357882589
##########
File path:
cli/src/main/java/org/apache/servicecomb/toolkit/cli/ToolkitMain.java
##########
@@ -33,7 +35,14 @@ public static void main(String[] args) {
initialProjectVersion();
- Cli.CliBuilder<Runnable> builder = Cli.<Runnable>builder("java -jar
toolkit-cli-" + projectVersion + ".jar");
+ String scriptName = System.getProperty("script.name");
+ Cli.CliBuilder<Runnable> builder = null;
+ if (StringUtils.isNotEmpty(scriptName)) {
+ builder = Cli.builder(scriptName);
+ } else {
+ builder = Cli.builder("java -jar toolkit-cli-" + projectVersion +
".jar");
+ }
Review comment:
@kakulisen Yeah, it's better now. One more thing, the executable jar
actually built is named 'cli-{version}.jar' not 'toolkit-cli-{version}.jar'
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services