[BUG] go run github.com/fabric8-analytics/cli-tools/gomanifest doesn't work, but gomanifest itself does, and the extension is trying for go run ...
See original GitHub issueDescribe the bug Im not sure but I think it is that the extension doesn’t work very well with golang 1.16, because of the following error I’m getting when trying to get the analysis for a golang project.
This is the ouput of the “Dependency Analytics” console:
CMD :go get -u github.com/fabric8-analytics/cli-tools/gomanifest && go run github.com/fabric8-analytics/cli-tools/gomanifest "/home/user/testingProject/" "/home/user/testingProject/target/golist.json" "go"
STDOUT :
STDERR : no required module provides package github.com/fabric8-analytics/cli-tools/gomanifest: go.mod file not found in current directory or any parent directory; see 'go help modules'
So the specific error seems to be that the command: go run github.com/fabric8-analytics/cli-tools/gomanifest is not runnable, since if I run the same command from an external terminal in a different directory it gives the same error, even when the command “gomanifest” alone works (meaning “gomanifest” is installed and found in the path).
To Reproduce Steps to reproduce the behavior:
-
Ubuntu 20.04 and VScode downloaded and installed manually.
-
Just open a golang project, and from the go.mod file open, click on the ‘Open Vulnerability Report’ icon:
-
Te following notification appears, just click on “Show Output Log”
-
See error
VSCode(please complete the following information):
- OS: Ubuntu 20.04
- VSCode version 1.54.3
- Dependency Analytics Version 0.3.0
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
This is also happening to me on MacOS.
@dgpatelgit The commit already on master works very well. Thanks. But it didn’t work on Windows. Then I just created PR #510 which adds upon your fix and includes Windows support. Please check.