1414import picocli .CommandLine .ExitCode ;
1515import picocli .CommandLine .Parameters ;
1616
17+ import java .io .UnsupportedEncodingException ;
1718import java .io .BufferedReader ;
1819import java .io .IOException ;
1920import java .io .InputStreamReader ;
2021import java .net .URI ;
22+ import java .net .URLDecoder ;
2123import java .nio .file .Files ;
2224import java .nio .file .Path ;
2325import java .nio .file .Paths ;
@@ -43,7 +45,12 @@ public int config() throws Exception {
4345
4446 @ Command (name = "clone" )
4547 public int cloneCmd (@ Parameters (index = "0" ) String url ) {
46-
48+ try {
49+ url = URLDecoder .decode (url ,"UTF-8" );
50+ }catch (UnsupportedEncodingException e ){
51+ throw new IllegalStateException (e .getMessage (), e );
52+ }
53+
4754 if (url .startsWith ("ide://" )) {
4855 // stripping out ide:// to simplify launcher scripts.
4956 url = url .substring (6 );
@@ -88,7 +95,7 @@ public int cloneCmd(@Parameters(index = "0") String url) {
8895 if (isBlob (url ))
8996 { // Example URL : https://github.com/starfixdev/starfix/blob/master/cli/pom.xml
9097 // Example URL2: https://github.com/hexsum/Mojo-Webqq/blob/master/script/check_dependencies.pl#L17
91-
98+ System . out . println ( url );
9299 String temp = url .substring (url .indexOf ("blob/" )+5 );
93100 branch = temp .substring (0 ,temp .indexOf ("/" ));
94101 filePath = temp .substring (temp .indexOf ("/" )+1 );
0 commit comments