File tree Expand file tree Collapse file tree 3 files changed +13
-143
lines changed
evaluation/tests/interface_tests Expand file tree Collapse file tree 3 files changed +13
-143
lines changed Original file line number Diff line number Diff line change @@ -348,6 +348,12 @@ test_IFS()
348348 $shell test-IFS.sh
349349}
350350
351+ test_shell_args ()
352+ {
353+ local shell=$1
354+ $shell -c " echo hi" -x 2>&1
355+ }
356+
351357run_test test1
352358run_test test2
353359run_test test3
@@ -391,6 +397,7 @@ run_test test_star
391397run_test test_env_vars
392398run_test test_redir_dup
393399run_test test_IFS
400+ # run_test test_shell_args # Bug that needs to be fixed with arg parsing
394401
395402if type lsb_release > /dev/null 2>&1 ; then
396403 distro=$( lsb_release -i -s)
Original file line number Diff line number Diff line change @@ -15,18 +15,6 @@ kill_all() {
1515old_umask=$( umask)
1616umask u=rwx,g=rx,o=rx
1717
18- # # Handle --init early exit
19- if [ " $# " -eq 1 ] && [ " $1 " = " --init" ]; then
20- " $PASH_TOP " /compiler/superoptimize.sh
21- exit
22- fi
23-
24- # # Check Python availability
25- if ! command -v python3 & > /dev/null; then
26- echo " Python >=3 could not be found"
27- exit 1
28- fi
29-
3018# # Get bash version for pash
3119export PASH_BASH_VERSION=" ${BASH_VERSINFO[@]: 0: 3} "
3220
@@ -343,16 +331,13 @@ PASH_FROM_SH="PaSh preprocessor" "$PASH_TOP/python_pkgs/bin/python" \
343331 " $PASH_TOP /compiler/pash_preprocessor.py" " ${preprocessor_args[@]} "
344332pash_exit_code=$?
345333
346- # # If preprocessing succeeded, execute with runner.sh
334+ # # If preprocessing succeeded, execute the preprocessed script
347335if [ " $pash_exit_code " -eq 0 ]; then
348- " $PASH_TOP /runtime/runner.sh" \
349- " $preprocessed_output " \
350- " $shell_name " \
351- " ${script_args[@]} " \
352- $allexport_flag \
353- $verbose_flag \
354- $xtrace_flag \
355- --debug " $PASH_DEBUG_LEVEL "
336+ # # The underlying shell needs to be invoked correctly
337+ # # with all shell-specific arguments.
338+ bash_flags=" $allexport_flag $verbose_flag $xtrace_flag "
339+ # shellcheck disable=SC2086
340+ bash $bash_flags -c " source $preprocessed_output " " $shell_name " " ${script_args[@]} "
356341 pash_exit_code=$?
357342fi
358343
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments