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

(MODULES-11424) Fix requirement method #287

Merged
merged 1 commit into from
Jun 12, 2023

Conversation

Clebam
Copy link

@Clebam Clebam commented Jun 6, 2023

This is related to this PR : #283

Having discussed this subject on puppet slack, it is recommended to use require_relative for this purpose.

The problem

require fails to find the path because of concatenation.

The cause

This fix : 2e11fe6
The thing is "Pathname" override the behavior of the "+" sign to handle the missing "/" in the path ( https://ruby-doc.org/stdlib-2.6.3/libdoc/pathname/rdoc/Pathname.html#method-i-2B )

The fix

As mentionned, it is recommended to use require_relative

@Clebam Clebam requested a review from a team as a code owner June 6, 2023 15:06
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Clement Le Roux seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@jordanbreen28
Copy link
Contributor

Thanks @Clebam!
Using require_relative is the preferred approach here, I've kicked the tests and lets 👀 what happens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants