Skip to content

Commit 52a5e30

Browse files
committed
parse repo root path from xml
1 parent 06a0853 commit 52a5e30

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/svn.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ svn.prototype.exec = function(cwd, args, options = {}) {
4848

4949
svn.prototype.getRepositoryRoot = async function(path) {
5050
try {
51-
let result = await this.exec(path, ["info", "--show-item", "wc-root"]);
52-
return result;
51+
let result = await this.exec(path, ["info", "--xml"]);
52+
let rootPath = result.match(/<wcroot-abspath>(.*)<\/wcroot-abspath>/i)[1];
53+
return rootPath;
5354
} catch (error) {
5455
throw new Error("not a SVN repo");
5556
}

0 commit comments

Comments
 (0)