Skip to content

Commit

Permalink
Merge pull request #23 from artoliukkonen/master
Browse files Browse the repository at this point in the history
Add "noConfirm" flag
  • Loading branch information
andrewphahn authored Mar 19, 2020
2 parents 3550afa + 8e6905c commit 5b4f08c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ custom:
prefix: my-prefix
minimumProtocolVersion: TLSv1.2_2018
priceClass: PriceClass_100
noConfirm: false # Alternative to --no-confirm flag. Use this parameter if you do not want a confirmation prompt to interrupt automated builds.
```
Expand Down Expand Up @@ -437,6 +438,22 @@ Set minimum SSL/TLS [protocol version](https://docs.aws.amazon.com/cloudfront/la

---

**noConfirm**

_optional_, default: `false`

```yaml
custom:
fullstack:
...
noConfirm: true
...
```

Use this parameter if you do not want a confirmation prompt to interrupt automated builds. If either this or `--no-confirm` CLI parameter is true the confirmation prompt will be disabled.

---

### Command-line Parameters


Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ServerlessFullstackPlugin {
return this.validateConfig()
.then(() => {
bucketName = this.getBucketName(this.options.bucketName);
return this.cliOptions.confirm === false ? true : new Confirm(`Are you sure you want to delete bucket '${bucketName}'?`).run();
return (this.cliOptions.confirm === false || this.options.noConfirm === true) ? true : new Confirm(`Are you sure you want to delete bucket '${bucketName}'?`).run();
})
.then(goOn => {
if (goOn) {
Expand Down Expand Up @@ -186,7 +186,7 @@ class ServerlessFullstackPlugin {
);

deployDescribe.forEach(m => this.serverless.cli.log(m));
return this.cliOptions.confirm === false ? true : new Confirm(`Do you want to proceed?`).run();
return (this.cliOptions.confirm === false || this.options.noConfirm === true) ? true : new Confirm(`Do you want to proceed?`).run();
})
.then(goOn => {
if (goOn) {
Expand Down

0 comments on commit 5b4f08c

Please sign in to comment.