You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by mr...@apache.org on 2017/08/23 18:35:36 UTC

[incubator-openwhisk-wskdeploy] branch master updated: Make interative mode able to set to false (#375)

This is an automated email from the ASF dual-hosted git repository.

mrutkowski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-wskdeploy.git


The following commit(s) were added to refs/heads/master by this push:
     new 230b7ad  Make interative mode able to set to false (#375)
230b7ad is described below

commit 230b7ad0abc57c7030a6f839f637795b94136f7e
Author: Vincent <sh...@us.ibm.com>
AuthorDate: Wed Aug 23 14:35:34 2017 -0400

    Make interative mode able to set to false (#375)
    
    The default value of interative mode should be false, instead of depending
    on utils.Flags.WithinOpenWhisk.
    
    Closes-Bug: #374
---
 cmd/root.go                  | 2 +-
 deployers/servicedeployer.go | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cmd/root.go b/cmd/root.go
index 539bd46..983bbad 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -113,7 +113,7 @@ func init() {
 	RootCmd.Flags().StringVarP(&utils.Flags.ProjectPath, "pathpath", "p", ".", "path to serverless project")
 	RootCmd.Flags().StringVarP(&utils.Flags.ManifestPath, "manifest", "m", "", "path to manifest file")
 	RootCmd.Flags().StringVarP(&utils.Flags.DeploymentPath, "deployment", "d", "", "path to deployment file")
-	RootCmd.PersistentFlags().BoolVarP(&utils.Flags.UseInteractive, "allow-interactive", "i", !utils.Flags.WithinOpenWhisk, "allow interactive prompts")
+	RootCmd.PersistentFlags().BoolVarP(&utils.Flags.UseInteractive, "allow-interactive", "i", false, "allow interactive prompts")
 	RootCmd.PersistentFlags().BoolVarP(&utils.Flags.UseDefaults, "allow-defaults", "a", false, "allow defaults")
 	RootCmd.PersistentFlags().BoolVarP(&utils.Flags.Verbose, "verbose", "v", false, "verbose output")
 	RootCmd.PersistentFlags().StringVarP(&utils.Flags.ApiHost, "apihost", "", "", wski18n.T("whisk API HOST"))
diff --git a/deployers/servicedeployer.go b/deployers/servicedeployer.go
index 1f968ec..d89b12f 100644
--- a/deployers/servicedeployer.go
+++ b/deployers/servicedeployer.go
@@ -119,7 +119,7 @@ func (deployer *ServiceDeployer) ConstructDeploymentPlan() error {
 
 	manifestReader.InitRootPackage(manifestParser, manifest)
 
-	if deployer.IsDefault == true && !utils.Flags.WithinOpenWhisk {
+	if deployer.IsDefault == true {
 		fileReader := NewFileSystemReader(deployer)
 		fileActions, err := fileReader.ReadProjectDirectory(manifest)
 		utils.Check(err)
@@ -183,7 +183,7 @@ func (deployer *ServiceDeployer) ConstructUnDeploymentPlan() (*DeploymentApplica
 // TODO(TBD): according to some planning?
 func (deployer *ServiceDeployer) Deploy() error {
 
-	if deployer.IsInteractive == true && !utils.Flags.WithinOpenWhisk {
+	if deployer.IsInteractive == true {
 		deployer.printDeploymentAssets(deployer.Deployment)
 		reader := bufio.NewReader(os.Stdin)
 		fmt.Print("Do you really want to deploy this? (y/N): ")

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].