Skip to content

Bug fix: resolve initialization script paths starting with ~ & release v0.5.1 #16

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

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

alexmalins
Copy link
Owner

What does this PR implement/fix?

Fix bug to properly resolve initialization script paths starting with ~ (i.e. user's home dir) supplied to --init-path.

Using only .resolve() means a path like ~/.my_startup.sql resolves to /Users/me/~/.my_startup.sql which does not exist.

Using .expanduser.resolve() means the path properly resolves to /Users/me/.my_startup.sql.

Fixes Issue

Other comments?

Using only `.resolve()` means a path like `~/.my_startup.sql`
resolves to `/Users/me/~/.my_startup.sql` which does not exist.

Using `.expanduser.resolve()` means the path properly resolves
to `/Users/me/.my_startup.sql`
alexmalins added a commit to alexmalins/harlequin that referenced this pull request Sep 21, 2024
Using only `.resolve()` means a path like `~/.my_startup.sql` resolves to `/Users/me/~/.my_startup.sql` which does not exist.

Using `.expanduser.resolve()` means the path properly resolves to `/Users/me/.my_startup.sql`.

cf. alexmalins/harlequin-databricks#16
@alexmalins alexmalins merged commit 438a794 into main Sep 21, 2024
9 checks passed
alexmalins added a commit to alexmalins/harlequin that referenced this pull request Sep 21, 2024
Using only `.resolve()` means a path like `~/.my_startup.sql` resolves to `/Users/me/~/.my_startup.sql` which does not exist.

Using `.expanduser.resolve()` means the path properly resolves to `/Users/me/.my_startup.sql`.

cf. alexmalins/harlequin-databricks#16
@alexmalins alexmalins deleted the resolve-tilder-home-dir-init-path branch September 21, 2024 15:30
tconbeer pushed a commit to tconbeer/harlequin that referenced this pull request Sep 25, 2024
Using only `.resolve()` means a path like `~/.my_startup.sql` resolves to `/Users/me/~/.my_startup.sql` which does not exist.

Using `.expanduser.resolve()` means the path properly resolves to `/Users/me/.my_startup.sql`.

cf. alexmalins/harlequin-databricks#16
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.

1 participant