Skip to content

Commit

Permalink
Merge pull request #22974 from MarioCadenas/fix/build-manager-path-ge…
Browse files Browse the repository at this point in the history
…neration

fix: Build manager adding multiple dashes to relative path
  • Loading branch information
ndelangen authored Jun 8, 2023
2 parents 4cf610a + 098c6a4 commit 7f1ffa7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion code/builders/builder-manager/src/utils/managerEntries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import { join, parse, relative, sep } from 'node:path';
import slash from 'slash';

const sanitizeBase = (path: string) => {
return path.replaceAll('.', '').replaceAll('@', '').replaceAll(sep, '-').replaceAll('/', '-');
return path
.replaceAll('.', '')
.replaceAll('@', '')
.replaceAll(sep, '-')
.replaceAll('/', '-')
.replaceAll(new RegExp(/^(-)+/g), '');
};

const sanitizeFinal = (path: string) => {
Expand Down

0 comments on commit 7f1ffa7

Please sign in to comment.