-
Notifications
You must be signed in to change notification settings - Fork 555
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
Fix: handle broken symlinks #1329
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 tasks
Superseded by #1335 which should allow existing tests to pass. :) This one can be closed. |
lili2311
force-pushed
the
fix/handle-broken-symlinks
branch
4 times, most recently
from
August 17, 2020 11:57
f51e5f4
to
55124b1
Compare
gitphill
previously approved these changes
Aug 17, 2020
lili2311
force-pushed
the
fix/handle-broken-symlinks
branch
18 times, most recently
from
August 19, 2020 10:45
0dd22bb
to
422f591
Compare
lili2311
force-pushed
the
fix/handle-broken-symlinks
branch
3 times, most recently
from
August 19, 2020 11:08
97c5acf
to
5993d1e
Compare
lili2311
force-pushed
the
fix/handle-broken-symlinks
branch
8 times, most recently
from
August 19, 2020 16:23
e395c7c
to
9348dc1
Compare
Add intentionally broken symlink to find-files test fixtures. This will break existing find-files.ts tests)
lili2311
force-pushed
the
fix/handle-broken-symlinks
branch
2 times, most recently
from
August 19, 2020 16:36
e5daeb4
to
0243e8e
Compare
orsagie
reviewed
Aug 20, 2020
@@ -3,7 +3,7 @@ import * as pathLib from 'path'; | |||
import * as _ from '@snyk/lodash'; | |||
import { detectPackageManagerFromFile } from './detect'; | |||
import * as debugModule from 'debug'; | |||
const debug = debugModule('snyk'); | |||
const debug = debugModule('snyk:find-files'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this, we should do this for more debugs
orsagie
approved these changes
Aug 20, 2020
do not fail catastrophically on broken symlinks in project folder when using --all-projects
lili2311
force-pushed
the
fix/handle-broken-symlinks
branch
from
August 20, 2020 09:50
0243e8e
to
cdffdc3
Compare
🎉 This PR is included in version 1.381.1 🎉 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes an edge case when using "snyk test --all-projects" in a project that contains a broken symlink. (Currently it fails catastrophically.)
Where should the reviewer start?
Small change to src/lib/find-files.ts
How should this be manually tested?
$ ln -s /path-that-does-not-exist broken-symlink
$ node dist/cli/index.js test --all-projects