@@ -123,7 +123,10 @@ export default new Command()
123123 if ( options . key ) {
124124 // minimatch for key patterns
125125 keysToRemove = Object . keys ( newData ) . filter ( ( k ) =>
126- minimatch ( k , options . key ! ) ,
126+ minimatch (
127+ decodeURIComponent ( k ) ,
128+ decodeURIComponent ( options . key ! ) ,
129+ ) ,
127130 ) ;
128131 } else {
129132 // No key specified: remove all keys
@@ -133,7 +136,7 @@ export default new Command()
133136 // Show what will be deleted
134137 if ( options . key ) {
135138 bucketOra . info (
136- `About to delete ${ keysToRemove . length } key(s) matching '${ options . key } ' from ${ bucketPath . pathPattern } [${ targetLocale } ]:\n ${ keysToRemove . slice ( 0 , 10 ) . join ( ", " ) } ${ keysToRemove . length > 10 ? ", ..." : "" } ` ,
139+ `About to delete ${ keysToRemove . length } key(s) matching '${ decodeURIComponent ( options . key ) } ' from ${ bucketPath . pathPattern } [${ targetLocale } ]:\n ${ keysToRemove . slice ( 0 , 10 ) . join ( ", " ) } ${ keysToRemove . length > 10 ? ", ..." : "" } ` ,
137140 ) ;
138141 } else {
139142 bucketOra . info (
@@ -161,7 +164,7 @@ export default new Command()
161164 await bucketLoader . push ( targetLocale , newData ) ;
162165 if ( options . key ) {
163166 bucketOra . succeed (
164- `Removed ${ keysToRemove . length } key(s) matching '${ options . key } ' from ${ bucketPath . pathPattern } [${ targetLocale } ]` ,
167+ `Removed ${ keysToRemove . length } key(s) matching '${ decodeURIComponent ( options . key ) } ' from ${ bucketPath . pathPattern } [${ targetLocale } ]` ,
165168 ) ;
166169 } else {
167170 bucketOra . succeed (
@@ -170,7 +173,7 @@ export default new Command()
170173 }
171174 } else if ( options . key ) {
172175 bucketOra . info (
173- `No keys matching '${ options . key } ' found in ${ bucketPath . pathPattern } [${ targetLocale } ]` ,
176+ `No keys matching '${ decodeURIComponent ( options . key ) } ' found in ${ bucketPath . pathPattern } [${ targetLocale } ]` ,
174177 ) ;
175178 } else {
176179 bucketOra . info ( "No keys to remove." ) ;
0 commit comments