Open roddi opened 4 years ago
Some sample outputs:
this command only checks the gemfile, otherwise succeeds:
snyk test -d
Testing xxxxx...
Organization: xxxxx
Package manager: rubygems
Target file: Gemfile
Project name: xxxxx
Open source: no
Project path: xxxxx
Licenses: enabled
with this command the package manager is set properly, but does not use neither podfile nor gemfile:
snyk test -d --package-manager=cocoapods
Error:
Testing xxxxx...
Unexpected name for target file!
at test (/snapshot/snyk/dist/cli/commands/test/index.js:173:23)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
at Function.Module.runMain (pkg/prelude/bootstrap.js:1317:13)
at startup (bootstrap_node.js:240:16)
at bootstrap_node.js:661:3
snyk analytics { args:
[ { debug: true,
packageManager: 'cocoapods',
org: undefined,
showVulnPaths: 'some' } ],
command: 'bad-command',
org: undefined,
metadata:
{ local: true,
'error-message': '\nTesting xxxxx...\n\nUnexpected name for target file!',
error: 'Error: \nTesting xxxxx...\n\nUnexpected name for target file!\n at test (/snapshot/snyk/dist/cli/commands/test/index.js:173:23)\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:189:7)\n at Function.Module.runMain (pkg/prelude/bootstrap.js:1317:13)\n at startup (bootstrap_node.js:240:16)\n at bootstrap_node.js:661:3',
'error-code': 500,
command: 'test' },
version: '1.305.0',
os: 'macOS Mojave',
nodeVersion: 'v8.16.2',
id: 'e6a907432454b0085d50d238883cd771f56eb7a2',
ci: false,
durationMs: 31 } +0ms
with this command the package manager and the target file are set properly, but the plugin still fails to use them:
snyk test -d --target-file=Podfile --package-manager=cocoapods
Error:
Testing xxxxx...
Unexpected name for target file!
at test (/snapshot/snyk/dist/cli/commands/test/index.js:173:23)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
at Function.Module.runMain (pkg/prelude/bootstrap.js:1317:13)
at startup (bootstrap_node.js:240:16)
at bootstrap_node.js:661:3
snyk analytics { args:
[ { debug: true,
'target-file': 'Podfile',
packageManager: 'cocoapods',
org: undefined,
showVulnPaths: 'some' } ],
command: 'bad-command',
org: undefined,
metadata:
{ local: true,
'error-message': '\nTesting xxxxx...\n\nUnexpected name for target file!',
error: 'Error: \nTesting xxxxx...\n\nUnexpected name for target file!\n at test (/snapshot/snyk/dist/cli/commands/test/index.js:173:23)\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:189:7)\n at Function.Module.runMain (pkg/prelude/bootstrap.js:1317:13)\n at startup (bootstrap_node.js:240:16)\n at bootstrap_node.js:661:3',
'error-code': 500,
command: 'test' },
version: '1.305.0',
os: 'macOS Mojave',
nodeVersion: 'v8.16.2',
id: '89a461037dfd0bb63cd7bc3f1180a7c4c15cec07',
ci: false,
durationMs: 30 } +0ms
using --file instead of --target-file solved it. MAybe it's worth to add it to the cocoapods docs as well.
I'm not sure whether the plugin should come with the homebrew installation or not but it does not seem to get installed. I did not find any helpful article on the snyk website according to plugins.
So please tell us how to install the plugin. (Or fix the homebrew package)
Thanks!