Skip to content

workers new leaves an orphaned scaffold when config.toml can't be written #6802

Description

@mandar1045

Affected area

Other

Supabase CLI version

2.117.0

Operating system

Arch Linux

Installation method

npm

Command

supabase experimental workers new api --runtime node --size 2gb --exposure private

Actual output

hen supabase/config.toml is read-only, the command fails with:
`PermissionDenied: FileSystem.writeFile (.../supabase/config.toml)`

But it still creates supabase/workers/api/. Retrying after fixing permissions fails because the directory already exists.

Expected behavior

On a config write failure, the command should not leave the scaffold directory behind, or should roll it back.

Steps to reproduce

  1. Create an empty project with supabase/config.toml.
  2. Make config.toml read-only: chmod 444 supabase/config.toml.
  3. Run the command above.
  4. Notice supabase/workers/api/ was created despite the failure.
  5. Restore write permission and retry; it fails because the directory is non-empty.

Crash report ID

No response

Docker and service versions

Additional context

This makes a failed scaffold require manual cleanup before retrying.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions