Browse files

support for windows null device redirections

Windows uses NUL: instead of UNIX /dev/null
  • Loading branch information...
1 parent de9c982 commit f042e7ff9943a0ca0c9416417534df4570b79a8d @zenpoy committed Jul 26, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/vulcan/cli.rb
View
8 lib/vulcan/cli.rb
@@ -27,6 +27,10 @@ class Vulcan::CLI < Thor
method_option :source, :aliases => "-s", :desc => "directory, tarball, or url containing the source"
method_option :deps, :aliases => "-d", :desc => "urls of vulcan compiled libraries to build with", :type=>:array
method_option :verbose, :aliases => "-v", :desc => "show the full build output", :type => :boolean
+
+ def null_dev
+ return test(?e, '/dev/null') ? '/dev/null' : 'NUL:'
+ end
def build
app = read_config[:app] || "need a server first, use vulcan create"
@@ -148,8 +152,8 @@ def update
file.puts ".env"
end
- system "git add . >/dev/null"
- system "git commit -m commit >/dev/null"
+ system "git add . >" + null_dev
+ system "git commit -m commit >" + null_dev
system "git push heroku -f master"
heroku "config:add SECRET=#{config[:secret]} SPAWN_ENV=heroku HEROKU_APP=#{config[:app]} HEROKU_API_KEY=#{api_key} NODE_PATH=lib NODE_ENV=production"

0 comments on commit f042e7f

Please sign in to comment.