Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli-1.1.12修改建议 #344

Open
valefor opened this issue Jun 4, 2020 · 0 comments
Open

cli-1.1.12修改建议 #344

valefor opened this issue Jun 4, 2020 · 0 comments

Comments

@valefor
Copy link

valefor commented Jun 4, 2020

自己写CI脚本需要用到非交互命令行模式

查看热更版本列表的时候会死循环:
pushy versions --no-interactive

建议修改:

async function listVersions(appId) {
  let offset = 0;
  

> if (NO_INTERACTIVE) {
>     await showVersion(appId, offset);
>   } else {

    while (true) {
      await showVersion(appId, offset);
      const cmd = await question('page Up/page Down/Begin/Quit(U/D/B/Q)');
      switch (cmd.toLowerCase()) {
        case 'u': offset = Math.max(0, offset - 10); break;
        case 'd': offset += 10; break;
        case 'b': offset = 0; break;
        case 'q': return;
      }
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants