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

[bug][v2][shell]In v2, the docker images command needs to be triggered twice to get the results correctly, but v1 only needs to be triggered once. #1153

Closed
bling-yshs opened this issue Apr 7, 2024 · 1 comment

Comments

@bling-yshs
Copy link

In v2, the docker images command needs to be triggered twice to get the results correctly, but v1 only needs to be triggered once.

However, I also tried echo "abc", and I could get the results immediately.

2024-04-07.08-46-46.mp4

my code:

const getDockerImageList = async () => {
  console.log("start")
  let command = Command.create("ps", [
    "docker", "images"
  ])
  let result = await command.execute()
  console.log("end")
  console.log(result.stdout)
  images.value = result.stdout
}

config:

{
  "$schema": "../gen/schemas/desktop-schema.json",
  "identifier": "default",
  "description": "Capability for the main window",
  "windows": [
    "main"
  ],
  "permissions": [
    "path:default",
    "event:default",
    "window:default",
    "app:default",
    "image:default",
    "resources:default",
    "menu:default",
    "tray:default",
    "shell:allow-open",
    "shell:default",
    {
      "identifier": "shell:allow-execute",
      "allow": [
        {
          "name": "ps",
          "cmd": "powershell",
          "args": true,
          "sidecar": false
        },
        {
          "name": "docker",
          "cmd": "docker",
          "args": true,
          "sidecar": false
        }
      ]
    }
  ]
}
@amrbashir
Copy link
Member

let's close this as duplicate of #1169 and keep the discussion there

@amrbashir amrbashir closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2024
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

2 participants