Skip to content

Commit

Permalink
fix: Fixed compatibility with SlikSVN (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias authored and JohnstonCode committed Oct 26, 2018
1 parent a7e8adf commit 21b4f6d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/svnFinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ export class SvnFinder {

public checkSvnVersion(svn: ISvn): Promise<ISvn> {
return new Promise<ISvn>((c, e) => {
if (!semver.valid(svn.version)) {
// fix compatibility with SlickSVN (like 1.6.17-SlikSvn-tag-1.6.17@1130898-X64)
const version = svn.version.replace(/^(\d+\.\d+\.\d+).*/, "$1");
if (!semver.valid(version)) {
e(new Error("Invalid svn version"));
} else if (!semver.gte(svn.version, "1.6.0")) {
} else if (!semver.gte(version, "1.6.0")) {
e(new Error("Required svn version must be >= 1.6"));
} else {
c(svn);
Expand Down

0 comments on commit 21b4f6d

Please sign in to comment.