How to capture the 'code' value into a variable?

前端 未结 3 853
生来不讨喜
生来不讨喜 2020-12-22 09:10

I\'m using the below code to reset a password on a linux box using nodejs and ssh2 module:

// FILE * ./workflow/ssh.js

var Client = require(\'ssh2\').Client         


        
3条回答
  •  庸人自扰
    2020-12-22 09:37

    The return value from the on close event is only returning out of the closure. You need to provide either a callback hook or a result object as a parameter from which to retrieve the result in the signature of the resetPassword method you export from the module.

提交回复
热议问题