Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Also sandbox IO.popen

This is for josegonzalez/homebrew-php.
  • Loading branch information...
commit c8effdeb27405cc37a3dbe85b541925ada8127d9 1 parent 4c24e77
@koraktor authored
Showing with 28 additions and 0 deletions.
  1. +1 −0  app/models/repository.rb
  2. +27 −0 lib/sandbox_io_popen.rb
View
1  app/models/repository.rb
@@ -262,6 +262,7 @@ def formulae_info(formulae)
$homebrew_path = base_repo.path
require 'sandbox_backtick'
+ require 'sandbox_io_popen'
ENV['HOMEBREW_NO_COMPAT'] = 'TRUE'
load 'global.rb'
View
27 lib/sandbox_io_popen.rb
@@ -0,0 +1,27 @@
+# This code is free software; you can redistribute it and/or modify it under
+# the terms of the new BSD License.
+#
+# Copyright (c) 2012, Sebastian Staudt
+
+require 'stringio'
+
+class IO
+
+ class << self
+ alias_method :orig_popen, :popen
+ end
+
+ def self.popen(command)
+ if command.end_with? 'phpize -v'
+ StringIO.new <<PHPIZE
+Configuring for:
+PHP Api Version: 20090626
+Zend Module Api No: 20090626
+Zend Extension Api No: 220090626
+PHPIZE
+ else
+ self.orig_popen command
+ end
+ end
+
+end
Please sign in to comment.
Something went wrong with that request. Please try again.