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

The stdout and stderr seem to be mixed up. stdout is for normal response and stderr is for error response. #21501

Open
1 task done
sandipchitale opened this issue Nov 26, 2024 · 0 comments
Assignees
Labels
area/desktop Issue affects a desktop edition of Docker. E.g docker for mac area/extensions Relates to Docker Extensions status/triage Needs triage

Comments

@sandipchitale
Copy link

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Information is incorrect

Description

await ddClient.extension.host.cli.exec("kubectl", ["-h"], {
  stream: {
    onOutput(data: { stdout: string } | { stderr: string }): void {
      if (data.stdout) {
        console.error(data.stdout);
      } else {
        console.log(data.stderr);
      }
    },
    onError(error: any): void {
      console.error(error);
    },
    onClose(exitCode: number): void {
      console.log("onClose with exit code " + exitCode);
    },
  },
});

Location

https://docs.docker.com/extensions/extensions-sdk/dev/api/backend/

Suggestion

I also think the type declaration of

data: { stdout: string } | { stderr: string }

Does not seem right.

@sandipchitale sandipchitale added the status/triage Needs triage label Nov 26, 2024
@dvdksn dvdksn added area/desktop Issue affects a desktop edition of Docker. E.g docker for mac area/extensions Relates to Docker Extensions labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/desktop Issue affects a desktop edition of Docker. E.g docker for mac area/extensions Relates to Docker Extensions status/triage Needs triage
Projects
None yet
Development

No branches or pull requests

3 participants