-
Notifications
You must be signed in to change notification settings - Fork 119
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: use dotRelative
glob option
#379
Conversation
@@ -10,7 +10,7 @@ const scriptsToLoad = process.env.SCRIPTS || './scripts/**/*.js' | |||
const { app, events } = require('./app') | |||
|
|||
// load all the files in the scripts folder | |||
globSync(scriptsToLoad).forEach((file) => { | |||
globSync(scriptsToLoad, { dotRelative: true }).forEach((file) => { | |||
logger.info('Loading:', file) | |||
require(file)(app, events) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why it's not showing up in this diff, but this line is currently:
require(`./${file}`)(app, events)
and will need to be adjusted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rebase the pr branch against main?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased and updated.
b48e4c0
to
8ce328d
Compare
Tested locally (since server.js isn't covered by the tests) and it works. |
Refs: #376 (comment)
Refs: isaacs/node-glob#495