Fixed args

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/context-enumeration@165659 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2018-04-06 12:35:52 +00:00
parent 0e9696dcf5
commit 5ad8ce14d6
1 changed files with 4 additions and 5 deletions

View File

@ -62,17 +62,16 @@ public class TokensUtil {
} }
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
System.out.println(args); if(args.length!=3) {
if(args.length!=4) {
System.out.println("Please provide 'vo file path' as first argument 'username' as second and 'external application name' as third"); System.out.println("Please provide 'vo file path' as first argument 'username' as second and 'external application name' as third");
return; return;
} }
File voFile = new File(args[1]); File voFile = new File(args[0]);
if(!voFile.exists()) { if(!voFile.exists()) {
System.out.println(args[1] + " does not exists"); System.out.println(args[0] + " does not exists");
return; return;
} }
getTokenForContexts(voFile, args[2], args[3]); getTokenForContexts(voFile, args[1], args[2]);
} }
} }