-
Notifications
You must be signed in to change notification settings - Fork 1k
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
hashfiles() expression function needs to handle symlink loop gracefully #234
Comments
The user reported issues: |
it might be good to leverage the node toolkit to do the glob rather than maintain separate logic in c# |
@ericsciple Since this is evaluated before the typescript action starts, how would we do that? |
invoke node :) nothing to do with any action. just bundle the required modules and invoke a node script to return a list of files paths |
think of it as a command line tool |
+1 on invoke node. |
+1 - think of node / javascript as a good xplat runtime / cli |
Im not sure globbing with node solves anything. Youll just get a list of files (some of which may be symlinks) and then when you try to hash them, wont you just follow the link to the target and hit the same issue? Although, there may be existing javascript implementations of things other than glob that could be leveraged |
dotnet doesn't have any api to deal with symlink, it always follow symlinks... |
Yea, my follow up was going to be youd need to detect cycles in code (tarjans, or maybe a max stack depth), or with an existing node module, or shell out to a different tool other than node that can do this. Beyond that, I dont know what the correct behavior is for hashing files that contain cyclic links, but it seems like you probably wouldnt be able to |
The feature flag that this is behind has rolled out everywhere. Thanks @TingluoHuang! |
When user has symlink loop in the folder they trying to hash, the runner will stuck on finding all files under the folder, the job will hang and user get no idea what's going wrong.
We need to detect the symlink loop, stop the recursion search and continue find other files.
The text was updated successfully, but these errors were encountered: