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

robot.loadScripts() producing bad paths #3

Closed
garychapman opened this issue Dec 11, 2017 · 2 comments
Closed

robot.loadScripts() producing bad paths #3

garychapman opened this issue Dec 11, 2017 · 2 comments

Comments

@garychapman
Copy link
Contributor

garychapman commented Dec 11, 2017

(I've observed this happening under Windows)

The call to this.load(rootPath.resolve(scriptsPath)) is producing paths such as:

C:\Users\gary\Documents\projects\testing-energybot\C:\Users\gary\Documents\projects\testing-energybot\scripts

Which results in the bot not loading scripts.

@timkinnane
Copy link
Contributor

That must be a windows bug with the package. The following:

const rootPath = require('app-root-path')
this.load(rootPath.resolve(scriptsPath))

...should be equivalent to:

const path = require('path')
const rootPath = require('app-root-path')
this.load(path.resolve(rootPath, scriptsPath))

Can you try the long form. Hopefully the core path module does a better job merging paths in windows.

@garychapman
Copy link
Contributor Author

Long form works perfectly.

garychapman added a commit that referenced this issue Dec 19, 2017
timkinnane pushed a commit that referenced this issue Jan 25, 2018
Resolved in last commit, just updating with conventional commit to trigger republish. Have also
added cz-conventional-changelog dev dep, for future use with Commitizen CLI.

fix #3
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

No branches or pull requests

2 participants