Skip to content

Commit

Permalink
Merge pull request #6
Browse files Browse the repository at this point in the history
Handle binary files correctly
  • Loading branch information
bencergazda authored Jul 20, 2022
2 parents ae319ef + 0fca3ab commit bb95f58
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 bb95f58

Please sign in to comment.