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

Allow ~ and fix for schema_export #46

Merged
merged 5 commits into from
Jan 5, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion doltcli/dolt.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ class Dolt(DoltT):
"""

def __init__(self, repo_dir: str, print_output: Optional[bool] = None):
# allow ~ to be used in paths
repo_dir = os.path.expanduser(repo_dir)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you mind adding a test for sample usage in tests/test_dolt.py?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test added

self.repo_dir = repo_dir
self._print_output = print_output or False

Expand Down Expand Up @@ -1366,7 +1368,7 @@ def schema_export(self, table: str, filename: Optional[str] = None):
args = ["schema", "export", table]

if filename:
args.extend(["--filename", filename])
args.extend([filename])
_execute(args, self.repo_dir)
return True
else:
Expand Down