Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cocona not expanding path parameter when CLI argument is given with equal sign #1829

Open
tkiapril opened this issue Jan 13, 2023 · 1 comment

Comments

@tkiapril
Copy link
Contributor

tkiapril commented Jan 13, 2023

Upon researching with @longfin, we found that when giving the CLI argument in a form like --ARG=~/example (e.g. for --store-path argument,) Cocona does not expand path parameter correctly. Thus, when --store-path is given with the equal sign(=), store is not loaded appropriately and thus say that there are no chain IDs. (When the process is inturrupted while preloading in this situation and is run again, it results in System.Collections.Generic.KeyNotFoundException: The given key ...

As bash expands ~, when the parameter is given in the form of --ARG ~/example, it is run correctly. Thus, we should check if the given path argument can be expanded. cc @dahlia

@dahlia
Copy link
Contributor

dahlia commented Jan 24, 2023

We could send a patch to Cocona so that it expands metacharacters like ~ and *, but I guess the maintainer would not accept such change. In Unix tradition, path expansion always has been up to shells rather than each application. (It's quite opposite in DOS and Windows though.) It's also confusing if --arg=~/foo means --arg="$HOME/foo" or --arg=./~/foo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants