File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
packages/cli/src/workers/bucket Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @replexica/cli " : patch
3+ " replexica " : patch
4+ ---
5+
6+ fixed path patter relativity
Original file line number Diff line number Diff line change @@ -20,14 +20,10 @@ import { ReplexicaCLIError } from '../../utils/errors';
2020import { csvLoader } from './csv' ;
2121
2222// Path expansion
23- export function expandPlaceholderedGlob ( pathPattern : string , sourceLocale : string ) : string [ ] {
23+ export function expandPlaceholderedGlob ( _pathPattern : string , sourceLocale : string ) : string [ ] {
2424 // Throw if pathPattern is an absolute path
25- if ( path . isAbsolute ( pathPattern ) ) {
26- throw new ReplexicaCLIError ( {
27- message : `Invalid path pattern: ${ pathPattern } . Path pattern must be relative.` ,
28- docUrl : 'invalidPathPattern'
29- } ) ;
30- }
25+ const absolutePathPattern = path . resolve ( _pathPattern ) ;
26+ const pathPattern = path . relative ( process . cwd ( ) , absolutePathPattern ) ;
3127 // Throw if pathPattern points outside the current working directory
3228 if ( path . relative ( process . cwd ( ) , pathPattern ) . startsWith ( '..' ) ) {
3329 throw new ReplexicaCLIError ( {
You can’t perform that action at this time.
0 commit comments