Pulumi 命令在中断后不起作用

Pulumi commands not working after intruption

正在中断 pulumi up 命令导致以下错误

error: could not get cloud url: failed to read Pulumi credentials file. Please re-run `pulumi login` to reset your credentials file: unexpected end of JSON input

尝试 运行 pulumi login 时出现以下错误

error: could not determine current cloud: failed to read Pulumi credentials file. Please re-run `pulumi login` to reset your credentials file: unexpected end of JSON input

知道如何解决这个问题

这是由于凭证文件损坏,运行 which pulumi 和安装目录中的 credentials.json 文件并删除它。 运行pulumi login