Skip to content
This repository has been archived by the owner on Sep 28, 2018. It is now read-only.

Clean up paths when reporting bugs to bugsnag #28

Merged
merged 1 commit into from Jan 13, 2017

Conversation

damieng
Copy link
Contributor

@damieng damieng commented Jan 12, 2017

Cleans up the root of paths on bugsnag

@damieng damieng merged commit bd473c2 into master Jan 13, 2017
@damieng damieng deleted the dg-clean-stack-paths branch January 13, 2017 01:56
let normalizePath = path => {
return path.replace('file:///', '') // Randomly inserted file url protocols
.replace(/[/]/g, '\\') // Temp switch for Windows home matching
.replace(fs.getHomeDirectory(), '~') // Remove users home dir for apm-dev'ed packages
Copy link
Contributor

Choose a reason for hiding this comment

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

Missed this before it got merged, but it looks like instead of having to require fs, we can use the already-required os with os.homedir()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are a lot of places where fsplus.getHomeDirectory() is used - we should clean them all up together. I'm assuming we can safely drop the node 0.9 stuff now (os.homedir() was introduced in 2.3)

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

Successfully merging this pull request may close these issues.

None yet

2 participants