File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def pkg
3131
3232 abort unpack_usage if ARGV . empty?
3333 identifier_prefix = if ARGV . include? '--identifier-prefix'
34- ARGV . next . chomp ( "." )
34+ ARGV [ ARGV . index ( '--identifier-prefix' ) + 1 ] . chomp ( "." )
3535 else
3636 'org.homebrew'
3737 end
@@ -103,7 +103,7 @@ def pkg
103103 # Add scripts if we specified --scripts
104104 found_scripts = false
105105 if ARGV . include? '--scripts'
106- scripts_path = ARGV . next
106+ scripts_path = ARGV [ ARGV . index ( '--scripts' ) + 1 ]
107107 if File . directory? ( scripts_path )
108108 pre = File . join ( scripts_path , "preinstall" )
109109 post = File . join ( scripts_path , "postinstall" )
@@ -126,7 +126,7 @@ def pkg
126126 # Custom ownership
127127 found_ownership = false
128128 if ARGV . include? '--ownership'
129- custom_ownership = ARGV . next
129+ custom_ownership = ARGV [ ARGV . index ( '--ownership' ) + 1 ]
130130 if [ 'recommended' , 'preserve' , 'preserve-other' ] . include? custom_ownership
131131 found_ownership = true
132132 ohai "Setting pkgbuild option --ownership with value #{ custom_ownership } "
You can’t perform that action at this time.
0 commit comments