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

Prepend relative pathname character to file variable if not provided #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FriendlyTroll
Copy link

This patch will prepend "./" characters to the provided $file variable if the path to the DB is not provided correctly. Calling the script currently like this

./migration.sh -f db_backup/rundeckdb

will result in a following error:

Exception in thread "main" org.h2.jdbc.JdbcSQLNonTransientConnectionException: A file path that is implicitly relative to the current working directory is not allowed in the database URL "jdbc:h2:db_backup/rundeckdb". Use an absolute path, ~/name, ./name, or the baseDir setting instead.

It will only work if called like this:
./migration.sh -f ./db_backup/rundeckdb

This patch should allow running the script both ways.

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

Successfully merging this pull request may close these issues.

2 participants