Skip to content

Fix/alert if path with filename - #232

Merged
Kirill89 merged 3 commits into
masterfrom
fix/alert-if-path-with-filename
Oct 8, 2018
Merged

Fix/alert if path with filename#232
Kirill89 merged 3 commits into
masterfrom
fix/alert-if-path-with-filename

Conversation

@Kirill89

@Kirill89 Kirill89 commented Oct 5, 2018

Copy link
Copy Markdown
Contributor

What does this PR do?

Check if user specify package file name as part of path and throw error if so.

Where should the reviewer start?

src/cli/index.ts

How should this be manually tested?

snyk test rubygems/Gemfile.lock

Jira?

SC-6271

@Kirill89 Kirill89 self-assigned this Oct 5, 2018
@Kirill89
Kirill89 requested review from lili2311 and miiila October 5, 2018 13:36
Comment thread src/lib/detect.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just disable this rule in the config please? It is too restrictive I think.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Kirill89
Kirill89 force-pushed the fix/alert-if-path-with-filename branch from a029e7a to b5217fd Compare October 8, 2018 14:15
@Kirill89
Kirill89 merged commit ae88c53 into master Oct 8, 2018
@Kirill89
Kirill89 deleted the fix/alert-if-path-with-filename branch October 8, 2018 14:29
Comment thread src/cli/index.ts
function checkPaths(args) {
for (const path of args.options._) {
if (typeof path === 'string' && isPathToPackageFile(path)) {
throw new Error(`Path "${path}" contains package file name, ` +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a little worried package is not clear enough, maybe we can do something like:
Not a recognised option did you mean --file=${path}

@snyksec

snyksec commented Oct 8, 2018

Copy link
Copy Markdown

🎉 This PR is included in version 1.102.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants