Skip to content

Commit

Permalink
fix(file): fix writeExistingFile
Browse files Browse the repository at this point in the history
closes #1044
  • Loading branch information
ihadeed committed Mar 2, 2017
1 parent 754c5ec commit 47f48ba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/plugins/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ export interface Flags {
}

export interface WriteOptions {
create?: boolean;
replace?: boolean;
append?: boolean;
truncate?: number; // if present, number of bytes to truncate file to before writing
Expand Down Expand Up @@ -799,7 +798,7 @@ export class File {
* @returns {Promise<void>} Returns a Promise that resolves or rejects with an error.
*/
static writeExistingFile(path: string, fileName: string, text: string | Blob): Promise<void> {
return File.writeFile(path, fileName, text, { create: false });
return File.writeFile(path, fileName, text, { replace: true });
}

/**
Expand Down

0 comments on commit 47f48ba

Please sign in to comment.