Skip to content

Commit 63afc4d

Browse files
authored
Merge pull request #331 from Syncano/fix/wrong_password_move_forward
Prevent moving forward after wrong password
2 parents d433e02 + 9bfa5b9 commit 63afc4d

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/cli/src/commands/login.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export default class Login {
9797
echo()
9898
echo(4)(`😢 ${format.red(err.message)}`)
9999
echo()
100+
process.exit(1)
100101
}
101102
}
102103

packages/cli/tests/unit/commands-login.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,14 @@ describe('[commands] Login', function () {
152152
loginCallback = sinon.stub(login, 'loginCallback')
153153
register = sinon.stub(login, 'register')
154154
sinon.stub(Login, 'promptCreation')
155+
sinon.stub(process, 'exit')
155156
})
156157

157158
after(function () {
158159
login.loginCallback.restore()
159160
login.register.restore()
160161
Login.promptCreation.restore()
162+
process.exit.restore()
161163
})
162164

163165
it('should return loginCallback', sinon.test(async function () {

0 commit comments

Comments
 (0)