wise-coders / dbschema

DbSchema Database Designer
https://dbschema.com
67 stars 3 forks source link

Difficulties running scripts in headless mode #103

Open baodrate opened 1 year ago

baodrate commented 1 year ago

Running v9.3.0 on Arch Linux with that tar.gz package (but AFAICT these should affect the other Linux packages as well).

  1. the /opt/dbschema/DbSchema script changes the working directory (e.g. cd "$prg_dir"). This means both the -x GROOVY_SCRIPT argument as well as any paths in the actual script itself need to be absolute paths to resolve correctly.

    • I notice old_pwd is set in /opt/dbschema/DbSchema, but it is never restored
  2. Is there a way to pass arguments to the script? I've tried DbSchema -x SCRIPT arg1 arg2 as well as DbSchema -x SCRIPT -args foo bar but as far as I can tell those arguments are not being passed to the actual groovy script. Is this correct?

  3. Execution starts off by printing this to stdout:

DbSchema 9.3.0 build 230415

Execute Script '<SCRIPT_PATH>' as Java Groovy.
  1. The script always exits with 0, even if it exited because of an uncaught exception