Skip to content

Use correct method to delete symlink in activate script#9126

Merged
mitchellhenke merged 2 commits intomainfrom
mitchellhenke/use-correct-file-rm-in-activateclear
Aug 31, 2023
Merged

Use correct method to delete symlink in activate script#9126
mitchellhenke merged 2 commits intomainfrom
mitchellhenke/use-correct-file-rm-in-activateclear

Conversation

@mitchellhenke
Copy link
Contributor

@mitchellhenke mitchellhenke commented Aug 31, 2023

🛠 Summary of changes

In #8786, we added a section of code to delete invalid symlinks, but it used the wrong method to call for the deletion. This PR adds a spec to cover the behavior and fixes the bug by calling FileUtils.rm instead of File.rm (which does not exist)

This PR slightly refactors some of the methods and makes some of them public so it is easier to interact with in the tests.

Mitchell Henke added 2 commits August 31, 2023 12:36
changelog: Bug Fixes, Service Provider Setup, Call correct method to delete symlink
Copy link
Contributor

@bleachbyte bleachbyte left a comment

Choose a reason for hiding this comment

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

This should hopefully fix the error currently showing up in provisioning prod:

NoMethodError: undefined method `rm' for File:Class

@mitchellhenke mitchellhenke merged commit 330d0b5 into main Aug 31, 2023
@mitchellhenke mitchellhenke deleted the mitchellhenke/use-correct-file-rm-in-activateclear branch August 31, 2023 18:44
mdiarra3 pushed a commit that referenced this pull request Aug 31, 2023
* add failing spec

* Call correct method to delete symlink

changelog: Bug Fixes, Service Provider Setup, Call correct method to delete symlink
@mdiarra3 mdiarra3 mentioned this pull request Aug 31, 2023
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