Skip to content
Open
Changes from all 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
9 changes: 5 additions & 4 deletions divio_cli/localdev/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ def restore_db(self):
)

restore_command = self.get_db_restore_command()

# TODO: use same dump-type detection like server side on db-api
try:
subprocess.call(
Expand Down Expand Up @@ -471,8 +470,10 @@ def setup(self):
db_dump_path = download_file(download_url, directory=self.path)
click.echo(" [{}s]".format(int(time() - start_download)))
# strip path from dump_path for use in the docker container
self.db_dump_path = "/app/{}".format(
db_dump_path.replace(self.path, "")
self.db_dump_path = os.path.join(
os.sep,
'app',
db_dump_path.replace(self.path, "").replace("/", ""),
)

def get_db_restore_command(self):
Expand Down Expand Up @@ -594,7 +595,7 @@ def dump_database(dump_filename, archive_filename=None):
"--no-owner",
"--no-privileges",
"-f",
os.path.join("/app/", dump_filename),
os.path.join(os.sep, "app", dump_filename),
),
env=get_subprocess_env(),
)
Expand Down