2023-08-10 16:53:25 -04:00
|
|
|
# Copyright (c) HashiCorp, Inc.
|
|
|
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
|
|
2012-05-23 19:03:14 -04:00
|
|
|
require "vagrant"
|
2014-01-08 00:13:21 -05:00
|
|
|
|
2012-01-08 14:14:01 -05:00
|
|
|
require 'vagrant/util/platform'
|
|
|
|
|
|
2012-04-19 01:20:45 -04:00
|
|
|
module VagrantPlugins
|
|
|
|
|
module HostWindows
|
2012-11-07 00:20:22 -05:00
|
|
|
class Host < Vagrant.plugin("2", :host)
|
2014-01-08 00:18:36 -05:00
|
|
|
def detect?(env)
|
2012-04-19 01:20:45 -04:00
|
|
|
Vagrant::Util::Platform.windows?
|
2012-01-08 14:14:01 -05:00
|
|
|
end
|
2018-06-12 13:49:10 -04:00
|
|
|
|
|
|
|
|
# @return [Pathname] Path to scripts directory
|
|
|
|
|
def self.scripts_path
|
2018-06-12 19:20:30 -04:00
|
|
|
Pathname.new(File.expand_path("../scripts", __FILE__))
|
2018-06-12 13:49:10 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# @return [Pathname] Path to modules directory
|
|
|
|
|
def self.modules_path
|
|
|
|
|
scripts_path.join("utils")
|
|
|
|
|
end
|
2012-01-08 14:14:01 -05:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|