Skip to content

Conversation

@jhart-r7
Copy link
Contributor

I use workspaces to separate the various things I happen to be working on, but it is pretty rare that I need to keep any workspace for very long. After a while I get a lot and have the urge to purge and prefer to not have to do this at the database level, so I figured the ability to delete all workspaces would be helpful. This complements other delete functionality but is a bit more dangerous.

Validation

  • Specs pass
  • Basic CLI testing:
msf > workspace 
* default
msf > workspace -a foo bar baf blargh
[*] Added workspace: foo
[*] Added workspace: bar
[*] Added workspace: baf
[*] Added workspace: blargh
msf > workspace -d blargh 
[*] Deleted workspace: blargh
[*] Switched workspace: default
msf > workspace 
* default
  foo
  bar
  baf
msf > workspace -D
[*] Deleted and recreated the default workspace
[*] Deleted workspace: foo
[*] Deleted workspace: bar
[*] Deleted workspace: baf
msf > workspace 
* default

Also, I know the specs I added are currently broken, because the existing testing framework only tests stuff that comes from print_line and print_error. I could convert workspace to use print_line or I could update

@wvu wvu self-assigned this Aug 31, 2015
@wvu
Copy link
Contributor

wvu commented Aug 31, 2015

I implemented this previously as workspace -d (without any options) and then tossed the code because it was deemed dangerous. Totally forgot about the convention of using an uppercase short option to denote "everything." Much better!

@wvu wvu merged commit 779ece3 into rapid7:master Aug 31, 2015
wvu added a commit that referenced this pull request Aug 31, 2015
@wvu
Copy link
Contributor

wvu commented Aug 31, 2015

Love it! Thanks again, @jhart-r7.

@jhart-r7 jhart-r7 deleted the delete_all_workspaces branch October 30, 2015 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants