Skip to content

Commit ece5c31

Browse files
Merge pull request #4792 from NativeScript/tachev/fix-clean-generated-files
fix: set the proper root for the auto-generated files glob matching
2 parents 66f57c7 + a09c8c0 commit ece5c31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/controllers/migrate-controller.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export class MigrateController extends UpdateControllerBase implements IMigrateC
165165
matchBase: true,
166166
nodir: true,
167167
absolute: false,
168-
root: projectData.appDirectoryPath
168+
cwd: projectData.appDirectoryPath
169169
};
170170

171171
const jsFiles = glob.sync("*.@(js|ts|js.map)", globOptions);
@@ -176,7 +176,7 @@ export class MigrateController extends UpdateControllerBase implements IMigrateC
176176

177177
const allGeneratedFiles = autoGeneratedJsFiles.concat(autoGeneratedJsMapFiles).concat(autoGeneratedCssFiles);
178178
for (const generatedFile of allGeneratedFiles) {
179-
const sourceFile = path.join(projectData.projectDir, generatedFile);
179+
const sourceFile = path.join(projectData.appDirectoryPath, generatedFile);
180180
const destinationFile = path.join(backupDir, generatedFile);
181181
const destinationFileDir = path.dirname(destinationFile);
182182
this.$fs.ensureDirectoryExists(destinationFileDir);

0 commit comments

Comments
 (0)