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
(cherry picked from commit 7f1ffa7)
  • Loading branch information
ndelangen authored and github-actions[bot] committed Jun 13, 2023
1 parent 64cde8e commit 545eb4c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion code/lib/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 545eb4c

Please sign in to comment.