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

Cannot source koi scripts #64

Open
wcarhart opened this issue Feb 9, 2021 · 0 comments
Open

Cannot source koi scripts #64

wcarhart opened this issue Feb 9, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@wcarhart
Copy link
Owner

wcarhart commented Feb 9, 2021

When running koi scripts, currently cannot run scripts with source. Seems like the issue is in __parseargs. Here's an example:

Source:

#!/bin/bash
set -e
source koi
koiname=set_env.sh
koidescription="Set up a virtualenv"
function __koimain {
    __addarg "-h" "--help" "help" "optional" "" "set up virtualenv"
    __addarg "" "environment" "positionalvalue" "required" "" "name of environmental variable"
    __parseargs "$@"
    echo "$environment"
    source "./Documents/virtualenvs/${environment}/bin/activate"
    cd "Documents/${environment}"
}
__koirun "$@"

Running it:

source set_env.sh --help
__action=help
__action=positionalvalue
__parseargs:51: bad substitution
[Process completed]
@wcarhart wcarhart added the bug Something isn't working label Feb 9, 2021
@wcarhart wcarhart self-assigned this Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant