Skip to content

Commit

Permalink
fix: GitHub always expects linux style paths
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Jul 27, 2020
1 parent 30ecac2 commit 0b9e83d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/release-pr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ type PullsListResponseItem = PromiseValue<
ReturnType<InstanceType<typeof Octokit>['pulls']['get']>
>['data'];

import {join} from 'path';
import * as semver from 'semver';

import {checkpoint, CheckpointType} from './util/checkpoint';
Expand Down Expand Up @@ -294,7 +293,9 @@ export class ReleasePR {
if (this.path === undefined) {
return file;
} else {
return join(this.path, `./${file}`);
const path = this.path.replace(/[/\\]$/, '');
file = file.replace(/^[/\\]/, '');
return `${path}/${file}`;
}
}
}

0 comments on commit 0b9e83d

Please sign in to comment.