feross / feross/hostile

Setting a new host removes line comments from existing hosts

Open
#46 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
794
Forks
49
PR merge metrics
No merged PRs in 30d

Description

Given a hosts file like:
```
127.0.0.1 localhost
10.0.0.100 otherhost # some comment
```

Adding a new configuration with `hostile set 127.0.0.1 newhost` adds the new host but removes the line comment from the existing entry, leaving
```
127.0.0.1 localhost
10.0.0.100 otherhost
127.0.0.1 newhost
```

I would expect this tool to leave existing line comments intact. I have other tooling which depends on their presence.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.