- 
                Notifications
    You must be signed in to change notification settings 
- Fork 258
drop artifactory from generate-react-native-fixture script #2476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
| for (const pkg of packages) { | ||
| // move the tarball to the fixture directory | ||
| const tarballName = `bugsnag-${pkg}-*.tgz` | ||
| const tarballFiles = fs.readdirSync(packagesDir).filter(file => file.match(new RegExp(tarballName.replace('*', '.*')))) | 
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
          
            
              
                
              
            
            Show autofix suggestion
            Hide autofix suggestion
          
      Copilot Autofix
AI 4 months ago
To fix the issue, we need to ensure that all occurrences of * in tarballName are replaced with .*. This can be achieved by using a regular expression with the global flag (g) in the replace method. This change ensures that the resulting regular expression correctly matches files even if tarballName contains multiple * characters.
The specific change involves replacing tarballName.replace('*', '.*') with tarballName.replace(/\*/g, '.*'). This uses a regular expression to match all * characters globally and replaces them with .*.
- 
    
    
    Copy modified line R118 
| @@ -117,3 +117,3 @@ | ||
| const tarballName = `bugsnag-${pkg}-*.tgz` | ||
| const tarballFiles = fs.readdirSync(packagesDir).filter(file => file.match(new RegExp(tarballName.replace('*', '.*')))) | ||
| const tarballFiles = fs.readdirSync(packagesDir).filter(file => file.match(new RegExp(tarballName.replace(/\*/g, '.*')))) | ||
| if (tarballFiles.length === 0) { | 
Goal
Design
Changeset
Testing