dcosson / vagrant-unison2

Vagrant plugin to sync local files to VM using Unison over SSH
MIT License
50 stars 8 forks source link

Repeating weird error message on host but doesn't affect syncing #35

Open louy2 opened 7 years ago

louy2 commented 7 years ago

Unison 2.48.4 Host is Windows 10 Guest is Alpine Linux 3.6 Engine is VirtualBox

The system cannot find the path specified.
The system cannot find the path specified.
Unison not running in VM

Despite the message syncing is fine. The message would repeat in exactly that order and counts.

Relevant code is at command.rb:98:

total_mem = `#{ssh_command_text} 'free -m | egrep "^Mem:" | awk "{print \\$2}"' 2>/dev/null`
_unison_proc_returnval = (
    `#{ssh_command_text} 'ps aux | grep "[u]nison -server" | awk "{print \\$2, \\$4}"' 2>/dev/null`
)
if _unison_proc_returnval == ''
    puts "Unison not running in VM"
    next
end

For some reason that thread cannot find my ssh. Weird.

louy2 commented 7 years ago

After some experiments, I found the culprit: /dev/null. Unfortunately for backtick Ruby executes the command under Windows cmd, not POSIX.