Skip to content

Commit

Permalink
fix(android/clean): do not remove log file when cleaning
Browse files Browse the repository at this point in the history
On Windows as we were trying to write to the log file and remove it at the same time this would cause an error
  • Loading branch information
ewanharris authored and sgtcoolguy committed Jun 17, 2020
1 parent 64b8966 commit a699bf5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion android/cli/commands/_cleanModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,18 @@ exports.run = async function run(logger, config, cli, finished) {
}
}

const buildDir = path.join(projectDir, 'build');
for (const file of await fs.readdir(buildDir)) {
if (file === 'clean_android.log') {
continue;
}
const filePath = path.join(buildDir, file);
logger.debug(__('Deleting %s', filePath.cyan));
await fs.remove(filePath);
}

// Delete the following files and directory trees.
const fileNames = [ 'build', 'dist', 'java-sources.txt' ];
const fileNames = [ 'dist', 'java-sources.txt' ];
for (const nextFileName of fileNames) {
const nextFilePath = path.join(projectDir, nextFileName);
if (await fs.exists(nextFilePath)) {
Expand Down

0 comments on commit a699bf5

Please sign in to comment.