in src/agentmgr.js [147:161]
async readActionWithCode() {
// user can switch between agents (ngrok or not), hence we need to restore first
// (better would be to track the agent + its version and avoid a restore, but that's TBD)
if (this.agentInstalled) {
this.actionWithCode = await this.restoreAction(true);
} else {
this.actionWithCode = await this.wsk.actions.get(this.actionName);
}
// extra sanity check
if (isAgent(this.actionWithCode)) {
throw new Error("Action seems to be a left over wskdebug agent instead of the original action. Possible bug in wskdebug. Please redeploy your action. Aborting.");
}
return this.actionWithCode;
}