Skip to content

Fix broken symlinks prevents the site to be started - #566

Merged
fluiddot merged 3 commits into
trunkfrom
fix/broken-symlink-prevent-start-site
Sep 26, 2024
Merged

Fix broken symlinks prevents the site to be started#566
fluiddot merged 3 commits into
trunkfrom
fix/broken-symlink-prevent-start-site

Conversation

@fluiddot

@fluiddot fluiddot commented Sep 26, 2024

Copy link
Copy Markdown
Contributor

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

@jeroenpf jeroenpf left a comment

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.

Great job! It fixes the issue for me.

@fluiddot
fluiddot merged commit cff350a into trunk Sep 26, 2024
@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

None yet

2 participants