Strip any leading /private/.

I don’t love that we have to do this manually, but I also can’t find
any node function that’ll do it for us :(
This commit is contained in:
joshaber
2015-12-30 12:11:06 -05:00
parent 3af5e8cc18
commit 28326b3674

View File

@@ -182,6 +182,11 @@ export default class GitRepositoryAsync {
return _path
}
// Depending on where the paths come from, they may have a '/private/'
// prefix. Standardize by stripping that out.
_path = _path.replace(/^\/private\//, '/')
workingDirectory = workingDirectory.replace(/^\/private\//, '/')
if (process.platform === 'win32') {
_path = _path.replace(/\\/g, '/')
} else {