get delete and exclude to work for pre and post deploy scripts (#12191)

This commit is contained in:
Kim Santiago
2020-09-09 16:46:09 -07:00
committed by GitHub
parent afb872b3e1
commit dad31bc387
3 changed files with 62 additions and 9 deletions

View File

@@ -417,7 +417,8 @@ export class ProjectsController {
if (root && fileOrFolder) {
// use relative path and not tree paths for files and folder
return project.files.find(x => utils.getPlatformSafeFileEntryPath(x.relativePath) === utils.getPlatformSafeFileEntryPath(utils.trimUri(root.fileSystemUri, fileOrFolder.fileSystemUri)));
const allFileEntries = project.files.concat(project.preDeployScripts).concat(project.postDeployScripts).concat(project.noneDeployScripts);
return allFileEntries.find(x => utils.getPlatformSafeFileEntryPath(x.relativePath) === utils.getPlatformSafeFileEntryPath(utils.trimUri(root.fileSystemUri, fileOrFolder.fileSystemUri)));
}
return project.files.find(x => utils.getPlatformSafeFileEntryPath(x.relativePath) === utils.getPlatformSafeFileEntryPath(utils.trimUri(context.root.uri, context.uri)));
}