Source:
<code>private static void call(PerunCommand command, String[] cliArgs) throws ParseException { Options options = new Options(); options.addOption(Option.builder("i").required(false).hasArg().longOpt("perun-url").desc("Perun base URL").build()); options.addOption(Option.builder("u").required(false).hasArg().longOpt("httpuser").desc("HTTP Basic Auth user").build()); options.addOption(Option.builder("p").required(false).hasArg().longOpt("httppassword").desc("HTTP Basic Auth password").build()); command.addOptions(options); CommandLine commandLine; try { commandLine = new DefaultParser().parse(options, cliArgs); } catch (MissingOptionException ex) { System.err.println(); new HelpFormatter().printHelp(command.getClass().getSimpleName(), options); System.exit(1); return; } String perunUrl = System.getenv("PERUN_URL"); if (commandLine.hasOption("i")) { perunUrl = commandLine.getOptionValue("i"); } if (perunUrl == null) perunUrl = "<LINK_0>"; <START> String user = System.getenv("PERUN_USER"); <END> if(commandLine.hasOption("u")) { user = commandLine.getOptionValue("u"); } if(user==null) { user = System.getProperty("user.name"); } String password = System.getenv("PERUN_PASSWORD"); if(commandLine.hasOption("p")) { password = commandLine.getOptionValue("p"); } if(password==null) { System.err.println("specify password with option -p or env variable PERUN_PASSWORD"); System.exit(1); } PerunRPC perunRPC = new PerunRPC(perunUrl, user, password); command.executeCommand(new CommandContext(perunRPC, commandLine)); }</code><technical_language>For CLI property PERUN_USER contains username password username/password. want conform this in new CLI for compatibility handle input in property</technical_language>

Target:
private static void call(PerunCommand command, String[] cliArgs) throws ParseException { Options options = new Options(); options.addOption(Option.builder(PERUN_URL_OPTION).required(false).hasArg().longOpt(PERUN_URL_VARIABLE).desc("Perun base URL").build()); options.addOption(Option.builder(PERUN_USER_OPTION).required(false).hasArg().longOpt(PERUN_USER_VARIABLE).desc("HTTP Basic Auth user/password").build()); command.addOptions(options); CommandLine commandLine; try { commandLine = new DefaultParser().parse(options, cliArgs); } catch (MissingOptionException ex) { System.err.println(); new HelpFormatter().printHelp(command.getClass().getSimpleName(), options); System.exit(1); return; } String perunUrl = System.getenv(PERUN_URL_VARIABLE); if (commandLine.hasOption(PERUN_URL_OPTION)) { perunUrl = commandLine.getOptionValue(PERUN_URL_OPTION); } if (perunUrl == null) perunUrl = "<LINK_0>"; String user = System.getenv(PERUN_USER_VARIABLE); if (commandLine.hasOption(PERUN_USER_OPTION)) { user = commandLine.getOptionValue(PERUN_USER_OPTION); } if (user == null) { System.err.println("specify username and password with option " + PERUN_USER_OPTION + " or env variable " + PERUN_USER_VARIABLE + " in the format 'username/password'"); System.exit(1); } int slash = user.indexOf('/'); if (slash == -1) { System.err.println("the username and password must be separated by the '/' character"); System.exit(1); } String username = user.substring(0, slash); String password = user.substring(slash + 1); PerunRPC perunRPC = new PerunRPC(perunUrl, username, password); command.executeCommand(new CommandContext(perunRPC, commandLine)); }