MCPcopy Index your code
hub / github.com/jetify-com/devbox / Reset

Function Reset

internal/setup/setup.go:282–291  ·  view source on GitHub ↗

Reset removes a task's state so that it acts as if it has never run.

(key string)

Source from the content-addressed store, hash-verified

280
281// Reset removes a task's state so that it acts as if it has never run.
282func Reset(key string) {
283 err := os.Remove(statePath(key))
284 if errors.Is(err, os.ErrNotExist) {
285 return
286 }
287 if err != nil {
288 err = taskError(key, fmt.Errorf("remove state file: %v", err))
289 slog.Error("ignoring setup task reset error", "err", err, "task", key)
290 }
291}
292
293type state struct {
294 ConfirmPrompt confirmPrompt `json:"confirm_prompt,omitempty"`

Callers 1

ConfigureRepromptFunction · 0.92

Calls 5

statePathFunction · 0.85
taskErrorFunction · 0.85
IsMethod · 0.80
RemoveMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected