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

[Node-Bash] Command invocation failed #139

Open
ahmad-invozone opened this issue Sep 9, 2021 · 0 comments
Open

[Node-Bash] Command invocation failed #139

ahmad-invozone opened this issue Sep 9, 2021 · 0 comments

Comments

@ahmad-invozone
Copy link

ahmad-invozone commented Sep 9, 2021

Executing simple command for disabling the GCLOUD CLI prompts command is getting executed fine but returning the response as command failed.

Package: Node-Bash (5.0.0-next.3)
Error: Command invocation failed
Environment:

  • System: MacOS BigSur
  • Node: 14

Code:

  return shell.invoke
    .then((data: ShellCommandResult) => {
      const str = data.result;
      console.log('Output', str, data); // temporary for debugging purpose
      return str;
    })
    .catch(async (err: Error) => {
      console.log('InvokeError', err.message);
      if (err.message.includes('now logged in as')) return err.message; // hack for GCP login error
      return null;
    });

Screenshot:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant