File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed
Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -189,60 +189,70 @@ doorstop_bool() {
189189}
190190
191191# Read from command line
192- while : ; do
192+ i=0; max=$#
193+ while [ $i -lt $max ]; do
193194 case " $1 " in
194195 --doorstop_enabled) # For backwards compatibility. Renamed to --doorstop-enabled
195196 enabled=" $( doorstop_bool " $2 " ) "
196197 shift
198+ i=$(( i+ 1 ))
197199 ;;
198200 --doorstop_target_assembly) # For backwards compatibility. Renamed to --doorstop-target-assembly
199201 target_assembly=" $2 "
200202 shift
203+ i=$(( i+ 1 ))
201204 ;;
202205 --doorstop-enabled)
203206 enabled=" $( doorstop_bool " $2 " ) "
204207 shift
208+ i=$(( i+ 1 ))
205209 ;;
206210 --doorstop-target-assembly)
207211 target_assembly=" $2 "
208212 shift
213+ i=$(( i+ 1 ))
209214 ;;
210215 --doorstop-boot-config-override)
211216 boot_config_override=" $2 "
212217 shift
218+ i=$(( i+ 1 ))
213219 ;;
214220 --doorstop-mono-dll-search-path-override)
215221 dll_search_path_override=" $2 "
216222 shift
223+ i=$(( i+ 1 ))
217224 ;;
218225 --doorstop-mono-debug-enabled)
219226 debug_enable=" $( doorstop_bool " $2 " ) "
220227 shift
228+ i=$(( i+ 1 ))
221229 ;;
222230 --doorstop-mono-debug-suspend)
223231 debug_suspend=" $( doorstop_bool " $2 " ) "
224232 shift
233+ i=$(( i+ 1 ))
225234 ;;
226235 --doorstop-mono-debug-address)
227236 debug_address=" $2 "
228237 shift
238+ i=$(( i+ 1 ))
229239 ;;
230240 --doorstop-clr-runtime-coreclr-path)
231241 coreclr_path=" $2 "
232242 shift
243+ i=$(( i+ 1 ))
233244 ;;
234245 --doorstop-clr-corlib-dir)
235246 corlib_dir=" $2 "
236247 shift
248+ i=$(( i+ 1 ))
237249 ;;
238250 * )
239- if [ -z " $1 " ]; then
240- break
241- fi
242- rest_args=" $rest_args $1 "
251+ set -- " $@ " " $1 "
243252 ;;
244253 esac
245254 shift
255+ i=$(( i+ 1 ))
246256done
247257
248258# Move variables to environment
275285 export DYLD_INSERT_LIBRARIES=" ${doorstop_name} :${DYLD_INSERT_LIBRARIES} "
276286fi
277287
278- # shellcheck disable=SC2086
279- exec " $executable_path " $rest_args
288+ exec " $executable_path " " $@ "
You can’t perform that action at this time.
0 commit comments