Skip to content

Commit

Permalink
* bugfix: now not trying to remove anything if no machine id is given
Browse files Browse the repository at this point in the history
  • Loading branch information
agiledivider committed Jun 18, 2013
1 parent d57fd20 commit 1f78ea4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ By setting the remove\_on\_suspend option, you can have them removed on **suspen

## Versions

### 0.0.9
* bugfix: now not trying to remove anything if no machine id is given

### 0.0.8
* trying to use proper windows hosts file

Expand Down
4 changes: 4 additions & 0 deletions lib/vagrant-hostsupdater/HostsUpdater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def addHostEntries()
end

def removeHostEntries
if !@machine.id
@ui.warn "No machine id, nothing removed from #@@hosts_path"
return
end
file = File.open(@@hosts_path, "rb")
hostsContents = file.read
uuid = @machine.id
Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-hostsupdater/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module VagrantPlugins
module HostsUpdater
VERSION = "0.0.8"
VERSION = "0.0.9"
end
end

0 comments on commit 1f78ea4

Please sign in to comment.