From f59b3083fb25161f3d009cf56f0ccbe34db3ddfd Mon Sep 17 00:00:00 2001 From: piotrze Date: Tue, 21 Nov 2023 13:49:11 +0100 Subject: [PATCH] Fix adding env with email option --- CHANGELOG.md | 3 +++ bin/pos-cli-env-add.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1497a1b6..d45b4fec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 4.12.8 +* Bug: fix adding env with `--email` option + ## 4.12.7 * Bug: Fixed success message for `env add` command * Bug: fix storing env in file diff --git a/bin/pos-cli-env-add.js b/bin/pos-cli-env-add.js index 5ee334c8..1040a585 100755 --- a/bin/pos-cli-env-add.js +++ b/bin/pos-cli-env-add.js @@ -35,7 +35,7 @@ const checkParams = params => { const login = async (email, password, url) => { return Portal.login(email, password, url) .then(response => { - if (response) Promise.resolve(response[0].token); + if (response) return Promise.resolve(response[0].token); }) }