[
https://issues.apache.org/jira/browse/IGNITE-24080?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mikhail Pochatkin updated IGNITE-24080:
---------------------------------------
Description:
Currently init command trying to parse configuration option `–config` as path
to print corresponding error message or ask a question in case of REPL mode.
But method for checking configuration as path just use Paths.get()
{code:java}
private static boolean checkConfigAsPath(String config) {
try {
Paths.get(config);
return true;
} catch (InvalidPathException e) {
return false;
}
} {code}
But this is not correct approach, we need to verify that this really existing
file on FS.
> Fix config path reading in CLI command
> ---------------------------------------
>
> Key: IGNITE-24080
> URL: https://issues.apache.org/jira/browse/IGNITE-24080
> Project: Ignite
> Issue Type: Bug
> Components: cli
> Reporter: Mikhail Pochatkin
> Assignee: Mikhail Pochatkin
> Priority: Major
> Labels: ignite-3, ignite-3-cli-tool
>
> Currently init command trying to parse configuration option `–config` as path
> to print corresponding error message or ask a question in case of REPL mode.
> But method for checking configuration as path just use Paths.get()
> {code:java}
> private static boolean checkConfigAsPath(String config) {
> try {
> Paths.get(config);
> return true;
> } catch (InvalidPathException e) {
> return false;
> }
> } {code}
> But this is not correct approach, we need to verify that this really existing
> file on FS.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)