utPLSQL / utPLSQL-cli

Command line client for invoking utPLSQL
Apache License 2.0
40 stars 15 forks source link

Support for execution of utplsql-cli from GitBash #210

Closed jgebal closed 1 year ago

jgebal commented 1 year ago

At the moment it is not possible to execute utplsql-cli from git bash. The shell script that invokes utPLSQL-cli fails to recognize gitBash. So in the utplsql script there are lines:

...
# OS specific support.  $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
case "`uname`" in
  CYGWIN*) cygwin=true ;;
  Darwin*) darwin=true
....

What is actually needied is to add one line: MINGW64*) cygwin=true ;; into the case statement

...
# OS specific support.  $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
case "`uname`" in
  MINGW64*) cygwin=true ;;
  CYGWIN*) cygwin=true ;;
  Darwin*) darwin=true
....

Without adding that line I see following errors when calling utplsql info

Error: Could not find or load main class org.utplsql.cli.Cli
Caused by: java.lang.ClassNotFoundException: org.utplsql.cli.Cli

With that line added, all works well:

[main] DEBUG org.utplsql.cli.Cli - Args: info
utPLSQL-cli 3.1.9.local
utPLSQL-java-api 3.1.9.local

Interestingly, it worked ok in version 3.1.8 so it seems that something got broken in version 3.1.9

jgebal commented 1 year ago

I have moved away from using gitbash and switched to using Ubuntu on WSL2. With that change, all works like a charm.