Skip to content

Commit

Permalink
Append to the host file on Win32
Browse files Browse the repository at this point in the history
  • Loading branch information
dlannoye committed Sep 22, 2019
1 parent 729142d commit 241d5a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platforms/win32.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default class WindowsPlatform implements Platform {
async addDomainToHostFileIfMissing(domain: string) {
let hostsFileContents = read(this.HOST_FILE_PATH, 'utf8');
if (!hostsFileContents.includes(domain)) {
await sudo(`echo 127.0.0.1 ${ domain } > ${ this.HOST_FILE_PATH }`);
await sudo(`echo 127.0.0.1 ${ domain } >> ${ this.HOST_FILE_PATH }`);
}
}

Expand Down

0 comments on commit 241d5a9

Please sign in to comment.