Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The exercism CLI follows [semantic versioning](http://semver.org/).

## Next Release

* [#200](https://github.com/exercism/cli/pull/200): Add guard to unsubmit command - [@kytrinyx](https://github.com/kytrinyx)
* **Your contribution here**

## v2.2.0 (2015-06-27)
Expand Down
8 changes: 5 additions & 3 deletions cmd/unsubmit.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ import (
"github.com/exercism/cli/config"
)

// Unsubmit deletes an iteration from the api.
// If no iteration is specified, the most recent iteration
// is deleted.
// Unsubmit deletes the most recent submission from the API.
func Unsubmit(ctx *cli.Context) {
if len(ctx.Args()) > 0 {
log.Fatal("\nThe unsubmit command does not take any arguments, it deletes the most recent submission.\n\nTo delete a different submission, you'll need to do it from the website.")
}

c, err := config.New(ctx.GlobalString("config"))
if err != nil {
log.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion exercism/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const (
descRestore = "Restores completed and current problems on from exercism.io, along with your most recent iteration for each."
descSubmit = "Submits a new iteration to a problem on exercism.io."
descSkip = "Skips a problem given a language and slug."
descUnsubmit = "Deletes the most recently submitted iteration."
descUnsubmit = "Deletes the most recently submitted solution."
descUpgrade = "Upgrades the CLI to the latest released version."
descTracks = "List the available language tracks"
descOpen = "Opens the current submission of the specified exercise"
Expand Down