Last active
June 29, 2016 11:36
-
-
Save lukeab/09be583c974ce95d174a25c4f952f843 to your computer and use it in GitHub Desktop.
Trying to detect os in vagrantfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module OS | |
def OS.windows? | |
(/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil | |
end | |
def OS.mac? | |
(/darwin/ =~ RUBY_PLATFORM) != nil | |
end | |
def OS.unix? | |
!OS.windows? | |
end | |
def OS.linux? | |
OS.unix? and not OS.mac? | |
end | |
end | |
$usenfssyncedfolders= OS.mac? true:false | |
$puppetsftype= OS.mac? 'nfs':'vboxsf' | |
==== ERror output === | |
Line number: 50 | |
Message: TypeError: OS is not a module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment