Skip to content

Commit 1561f6a

Browse files
Pedro Piñera Buendíaclaude
authored andcommitted
fix: Clean dest before extracting to avoid stale app versions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 35cddc0 commit 1561f6a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/terrarium/runtime.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ defmodule Terrarium.Runtime do
219219

220220
remote_tarball = "#{dest}/deploy.tar.gz"
221221

222-
with {:ok, %{exit_code: 0}} <- Terrarium.exec(sandbox, "mkdir -p #{dest}"),
222+
with {:ok, %{exit_code: 0}} <- Terrarium.exec(sandbox, "rm -rf #{dest} && mkdir -p #{dest}"),
223223
:ok <- Terrarium.transfer(sandbox, tarball_path, remote_tarball),
224224
{:ok, %{exit_code: 0}} <- Terrarium.exec(sandbox, "tar xzf #{remote_tarball} -C #{dest}"),
225225
{:ok, %{exit_code: 0}} <- Terrarium.exec(sandbox, "rm -f #{remote_tarball}") do

0 commit comments

Comments
 (0)