fabric8-analytics-vscode-extension
fabric8-analytics-vscode-extension copied to clipboard
[BUG] Error popup each time a Dockerfile is shown in Visual Studio Code
Describe the bug Each time I open a Dockerfile in Visual Studio Code, I get a notification with an error message like
Command failed: java -DRHDA_TOKEN=f9949b4c-11ca-4a03-9d3c-9bea921b9fb1 -DRHDA_SOURCE=vscode -DEXHORT_SYFT_PATH=syft -DEXHORT_SKOPEO_PATH=skopeo -DEXHORT_DOCKER_PATH=docker -DEXHORT_PODMAN_PATH=podman -jar c:\Users\alice\.vscode\extensions\redhat.fabric8-analytics-0.9.5\dist/../javaApiAdapter/exhort-java-api-adapter-1.0-SNAPSHOT-jar-with-dependencies.jar json alpine
Exception in thread "main" java.lang.RuntimeException: Failed to execute command 'skopeo inspect --raw docker://alpine:latest'
at com.redhat.exhort.tools.Operations.runProcessGetFullOutput(Operations.java:227)
at com.redhat.exhort.image.ImageUtils.execSkopeoInspect(ImageUtils.java:408)
at com.redhat.exhort.image.ImageUtils.getImageDigests(ImageUtils.java:265)
at com.redhat.exhort.image.ImageRef.checkImageDigest(ImageRef.java:121)
at com.redhat.exhort.image.ImageRef.<init>(ImageRef.java:48)
at com.redhat.exhort.ImageRefInput.<init>(ImageRefInput.java:10)
at com.redhat.exhort.Main.parseArguments(Main.java:121)
at com.redhat.exhort.Main.main(Main.java:27)
Caused by: java.io.IOException: Cannot run program "skopeo": CreateProcess error=2, Das System kann die angegebene Datei nicht finden
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
at java.base/java.lang.Runtime.exec(Runtime.java:681)
at java.base/java.lang.Runtime.exec(Runtime.java:491)
at java.base/java.lang.Runtime.exec(Runtime.java:366)
at com.redhat.exhort.tools.Operations.runProcessGetFullOutput(Operations.java:194)
... 7 more
Caused by: java.io.IOException: CreateProcess error=2, Das System kann die angegebene Datei nicht finden
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:500)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:159)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126)
... 12 more
(The error message means it cannot find the file)
To Reproduce Steps to reproduce the behavior:
-
Save this Dockerfile:
FROM alpine RUN apk add texlive
-
Open it in Visual Studio Code
-
Error popup appears:
Expected behavior Do not show any error messages if skopeo is not found, without the error message I wouldn’t even know of this extension, I did not install it myself
VSCode(please complete the following information):
- OS: Windows 10
- VSCode version: 1.92.1
- Dependency Analytics Version: v0.9.5
Additional context Some time ago I could work with these Dockerfiles without a problem.