arc delete
Delete the game.
Usage
arc delete [options]
Options:
-j, --json Format output as JSON [boolean] [default: false]
-q, --quiet Output only errors [boolean] [default: false]
-C, --cwd Set the working directory [string] [default: "."]
--yes Don't ask first [boolean]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
Description
Deletes the project's game from Arcadible: the game with the project's id. It takes no handle or id on the command line, so it only ever deletes the game of the project it runs in, or the one -C names.
Deleting a game is permanent. The game and all of its builds are removed from Arcadible at once, and it can't be undone.
Only the game's owner can delete it, so it needs you to be logged in. What deleting does to the game's handle, its repository, and its id is in Delete a game; Studio's Delete game does the same.
At a terminal, it asks first, naming the game by its title, and anything but yes leaves the game as it is (Left as it is.):
? Delete Star Drift? The game and all of its builds are deleted right away. This can't be undone. (y/N)
Anywhere else (a script, CI, an agent, a pipe, or with --json), there's no one to ask, so it's refused unless --yes says it's meant, before anything is read or sent:
$ arc delete
Delete aborted.
This can't be undone, so say it's meant:
arc delete --yes
Code: argument_invalid
https://developer.arcadible.com/references/errors#argument_invalid
--yes is only ever an option on the command line: .arcrc can't set it.
It then checks, in order: that the project has an id (game_id_missing), and that you're logged in (not_logged_in). A game that was never deployed, was deleted already, or belongs to another account is refused as game_unavailable.
It leaves your project's files as they are, and says so:
$ arc delete --yes
Deleted Star Drift.
Your files are unchanged: arcadible.toml keeps the deleted game's ID.
To deploy it as a new game, delete the `id` line and run `arc init`.
Output
It prints the game it deleted, and what's left in the project. With --json, the deleted game's id:
{ "game": "757c395c-11e1-419b-943a-6366882443f7" }
With --quiet, it prints nothing.
| Code | When |
|---|---|
0 | The game was deleted, or you answered no and it was left as it is |
1 | It wasn't deleted: --yes was needed, you're not logged in, or the game isn't yours or isn't there |