Skip to content

fix(cli): copy files to local when not present#64

Merged
QuiiBz merged 4 commits intomainfrom
cli/fix-copy-local-files
Feb 24, 2026
Merged

fix(cli): copy files to local when not present#64
QuiiBz merged 4 commits intomainfrom
cli/fix-copy-local-files

Conversation

@QuiiBz
Copy link
Member

@QuiiBz QuiiBz commented Feb 24, 2026

When copying to local files, we currently also enforce that the destination must exists:

sbx cp sbx_abc:source.txt dest.txt # only works if dest.txt exists

Fix that by removing Fs.File and checking manually later on if the local source file exists or not: if it doesn't, we still throw an error. If the dest source file doesn't exist, if will be created by fs.writeFile()

Also unify the fields, improve the error messages and logs, and add tests

@QuiiBz QuiiBz requested review from Schniz and marc-vercel February 24, 2026 13:38
@vercel
Copy link

vercel bot commented Feb 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sandbox-cli Ready Ready Preview, Comment Feb 24, 2026 1:46pm
sandbox-sdk Ready Ready Preview, Comment Feb 24, 2026 1:46pm
sandbox-sdk-ai-example Ready Ready Preview, Comment Feb 24, 2026 1:46pm

Request Review

@QuiiBz QuiiBz enabled auto-merge (squash) February 24, 2026 13:46
@QuiiBz QuiiBz merged commit d556183 into main Feb 24, 2026
10 checks passed
@QuiiBz QuiiBz deleted the cli/fix-copy-local-files branch February 24, 2026 13:47
@github-actions github-actions bot mentioned this pull request Feb 24, 2026
QuiiBz added a commit that referenced this pull request Feb 24, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## sandbox@2.5.3

### Patch Changes

- Add `--vcpus` flag to `create` and `run` commands for configuring
sandbox resources. ([#65](#65))

- Fix copying files to local path when not already present
([#64](#64))

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tom Lienard <tom.lienrd@gmail.com>
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