When using ok-bash within an external script (like awesomecsv, revision 2) there might be a problem.
The script (awesomecsv) can use ok, because it's exported as an bash function with this line:
export -f ok
This line causes some problems, notably in GitHub Desktop when pushing I get an warning /bin/sh: error importing function... I think is caused by ok-bash. I've filed this issue via GitHub Developer Support (there is no public issue tracker for this), but we couldn't really track down the cause.
However, when not exporting the function, the problem seems to go away.
I think the function export would best be removed. As alternative, external tools can source the ok-bash into their own environment with this code (including discovery):
if [[ -r "$_OK__PATH_TO_ME/ok.sh" ]]; then
. "$_OK__PATH_TO_ME/ok.sh" #and some options
fi
However, it would be nice to have a why for this problem.
For the time being, I've pushed a seperate branch called no-function-export demonstrating the solution. I'll merge it when I've got more information on this.
When using ok-bash within an external script (like awesomecsv, revision 2) there might be a problem.
The script (awesomecsv) can use
ok
, because it's exported as an bash function with this line:This line causes some problems, notably in GitHub Desktop when pushing I get an warning
/bin/sh: error importing function...
I think is caused byok-bash
. I've filed this issue via GitHub Developer Support (there is no public issue tracker for this), but we couldn't really track down the cause.However, when not exporting the function, the problem seems to go away.
I think the function export would best be removed. As alternative, external tools can
source
the ok-bash into their own environment with this code (including discovery):However, it would be nice to have a why for this problem.
For the time being, I've pushed a seperate branch called no-function-export demonstrating the solution. I'll merge it when I've got more information on this.