Skip to content

Commit

Permalink
fix: Handle binary files correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
bencergazda committed Jul 20, 2022
1 parent ae319ef commit 0fca3ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,13 @@ export async function copy_file_or_directory(source_path: string, destination_pa

// console.log('COPY', source_path, 'to', destination_path);

const raw_content = await promisified.fse.readFile(source_path, 'utf8');
const raw_content = await promisified.fse.readFile(source_path);

const processed_content = await apply_loaders(raw_content, source_path, destination_path, config);

await validate_path(destination_path);

return promisified.fse.writeFile(destination_path, processed_content, 'utf8');
return promisified.fse.writeFile(destination_path, processed_content);
}

/**
Expand Down

0 comments on commit 0fca3ab

Please sign in to comment.