mapbox / tilesets-cli

CLI for interacting with the Mapbox Tilesets API and Mapbox Tiling Service
https://docs.mapbox.com/mapbox-tiling-service
BSD 2-Clause "Simplified" License
125 stars 27 forks source link

Prompt for deletion #26

Closed dnomadb closed 4 years ago

dnomadb commented 5 years ago

We currently allow deletion of sources without double-checking. This would be easy for someone to accidentally run, so we should prompt before running:

$ tilesets delete <user> <source>
Are you sure you want to delete <user> <source>? (y/n) y
Source deleted.
Gerdie commented 4 years ago

implemented in version 0.3.3

matthewhardern commented 4 years ago

Would just like to point out that this broke in a CI/CD tool that we use to build tile-sets. We should consider this when such change requests are made. Is there a way to auto say YES?

dnomadb commented 4 years ago

Is there a way to auto say YES?

@matthewhardern There would be two ways to handle this:

  1. Run via yes | tilesets delete-source which will say yes, or;
  2. We could add a --force flag

For the short term perhaps # 1 will suffice, but adding # 2 is certainly viable.