Skip to content

Commit

Permalink
add some comments around win32-process
Browse files Browse the repository at this point in the history
We are just leaving some breadcrumbs here and there so that we know
why/when/where it is needed/used.
  • Loading branch information
dustymabe committed Jul 21, 2016
1 parent 1aabefe commit 7ffe5bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/vagrant-sshfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
raise "The Vagrant sshfs plugin must be run within Vagrant"
end

# Only load the gem on Windows since it replaces some methods in Ruby's Process class
# Also load before Process.uid is called the first time by Vagrant
# Only load the gem on Windows since it replaces some methods in Ruby's
# Process class. Also load it here before Process.uid is called the first
# time by Vagrant. The Process.create() function actually gets used in
# lib/vagrant-sshfs/cap/linux/sshfs_mount.rb
if Vagrant::Util::Platform.windows?
require 'win32/process'
end
Expand Down
7 changes: 7 additions & 0 deletions lib/vagrant-sshfs/cap/linux/sshfs_mount.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
require "vagrant/util/retryable"
require "tempfile"

# This is already done for us in lib/vagrant-sshfs.rb. We needed to
# do it there before Process.uid is called the first time by Vagrant
# This provides a new Process.create() that works on Windows.
if Vagrant::Util::Platform.windows?
require 'win32/process'
end

module VagrantPlugins
module GuestLinux
module Cap
Expand Down

0 comments on commit 7ffe5bd

Please sign in to comment.