Skip to content
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 broken symlinks prevents the site to be started #566

Merged
merged 3 commits into from
Sep 26, 2024

Conversation

fluiddot
Copy link
Contributor

@fluiddot fluiddot commented Sep 26, 2024

Related to 9257-gh-Automattic/dotcom-forge.

Proposed Changes

  • Handle exceptions when reading a symlink and avoid generating an exception if it can't be resolved.
  • Add unit test to cover broken symlinks case.

Testing Instructions

  • Run the app with npm start.
  • Create a site and stop it.
  • Click on the Terminal button.
  • Run the command ln -s unknown broken-symlink to create a broken symlink.
  • Start the site.
  • Observe no error message is displayed but the site doesn't start.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@fluiddot fluiddot requested a review from a team September 26, 2024 11:52
@fluiddot fluiddot self-assigned this Sep 26, 2024
Copy link
Contributor

@jeroenpf jeroenpf left a comment

Choose a reason for hiding this comment

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

Great job! It fixes the issue for me.

@fluiddot fluiddot merged commit cff350a into trunk Sep 26, 2024
12 checks passed
@fluiddot fluiddot deleted the fix/broken-symlink-prevent-start-site branch September 26, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants