File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,12 +110,11 @@ export class UnityEditor {
110110 return undefined ;
111111 }
112112
113- // Build a regex to match the template name and an optional numeric version suffix
113+ // Build a regex to match the template name, an optional numeric version suffix, and required file extension
114114 // Example input: com.unity.template.3d(-cross-platform)?.*
115- // Example match: com.unity.template.3d-cross-platform-1.2.3 or com.unity.template.3d-1.2.3.tgz
115+ // Example match: com.unity.template.3d-cross-platform-1.2.3.tar.gz or com.unity.template.3d-1.2.3.tgz
116116 let regex : RegExp ;
117117 try {
118- // allow either no suffix, the numeric suffix, then required .tgz or .tar.gz
119118 regex = new RegExp ( `^${ template } (?:-\\d+\\.\\d+\\.\\d+)?(?:\\.tgz|\\.tar\\.gz)$` ) ;
120119 } catch ( e ) {
121120 throw new Error ( `Invalid template regex: ${ template } ` ) ;
You can’t perform that action at this time.
0 commit comments