mhallin / vagrant-notify-forwarder

A file system event forwarding plugin for Vagrant
MIT License
153 stars 18 forks source link

libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Could not resolve path #6

Closed hedinfaok closed 8 years ago

hedinfaok commented 8 years ago

When a legal source path in the Vagrantfile for synced directories contains tilde expansion (~/) shorthand for the current user's directory, notify-forwarder on the host fails with the following error:

libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Could not resolve path

This is because File.absolute_path() treats the tilde as a relative path to the current working directory, not the user's directory. The current version of notify-forwarder seems to be able to deal with tilde expansion natively, so we can pass the :hostpath values directly to notify-forwarder.

Example sync directory entry in Vagrantfile that causes the error:

config.vm.synced_folder "~/Desktop/Web", "/var/www"
hedinfaok commented 8 years ago

@mhallin let me know what you think of this patch, and thanks for writing the extremely useful notify-forwarder utility!