List "Installing" sdks by default.
[src/xds/xds-cli.git] / cmd-projects.go
index 6e7241a..fc4bc22 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 "IoT.bzh"
+ * Copyright (C) 2017-2018 "IoT.bzh"
  * Author Sebastien Douheret <sebastien@iot.bzh>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,7 +22,7 @@ import (
        "fmt"
        "strings"
 
-       "github.com/iotbzh/xds-agent/lib/xaapiv1"
+       "gerrit.automotivelinux.org/gerrit/src/xds/xds-agent.git/lib/xaapiv1"
        "github.com/urfave/cli"
 )
 
@@ -92,6 +92,10 @@ func initCmdProjects(cmdDef *[]cli.Command) {
                                                Usage:  "project id",
                                                EnvVar: "XDS_PROJECT_ID",
                                        },
+                                       cli.BoolFlag{
+                                               Name:  "force, f",
+                                               Usage: "remove confirmation prompt before removal",
+                                       },
                                },
                        },
                        {
@@ -209,6 +213,12 @@ func projectsRemove(ctx *cli.Context) error {
                return cli.NewExitError("id parameter or option must be set", 1)
        }
 
+       if !ctx.Bool("force") {
+               if !Confirm("Do you permanently remove project id '" + id + "' [yes/No] ? ") {
+                       return nil
+               }
+       }
+
        if err := HTTPCli.Delete("/projects/"+id, &res); err != nil {
                return cli.NewExitError(err, 1)
        }