Skip to content

Commit

Permalink
Merge pull request #37 from dlannoye/append-on-windows
Browse files Browse the repository at this point in the history
Append to the host file on Win32
  • Loading branch information
zetlen authored Nov 4, 2019
2 parents 729142d + 241d5a9 commit 0df830c
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 0df830c

Please sign in to comment.