Skip to content

Commit 70b3812

Browse files
authored
Merge pull request pharo-project#20 from cdlm/fix-headless-args
pharo-ui wrapper script of headless VMs is broken
2 parents 51a2627 + 996470b commit 70b3812

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

mc/ZeroConf.package/ZeroConfVMVersionHeadlessScript.class/instance/generateVmScriptCreator.st

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,18 @@ cd - > /dev/null
1717
set -f
1818
# run the VM and pass along all arguments as is'' >> $VM_SCRIPT
1919
20+
echo "image_name=\\"\\$1\\"" >> $VM_SCRIPT
21+
echo "shift" >> $VM_SCRIPT
22+
23+
# make sure we only substite $PHARO_VM but put "$DIR" in the script
24+
echo -n "\\"\\$DIR\\"/\\"$PHARO_VM\\" \\"\\$image_name\\"" >> $VM_SCRIPT
25+
2026
# output the interactive option if the VM_SCRIPT name includes "ui"
2127
if [[ "\{$VM_SCRIPT}" == *ui* ]]; then
22-
echo "image_name=\\"\\$1\\"" >> $VM_SCRIPT
23-
echo "shift" >> $VM_SCRIPT
24-
echo "image_arguments=\\"\\$@\\"" >> $VM_SCRIPT
25-
echo -n \\"\\$DIR\\"/\\"$PHARO_VM\\" >> $VM_SCRIPT
26-
echo " \\"\\$image_name\\" --interactive \\"\\$image_arguments\\"" >> $VM_SCRIPT
27-
else
28-
# make sure we only substite $PHARO_VM but put "$DIR" in the script
29-
echo -n \\"\\$DIR\\"/\\"$PHARO_VM\\" >> $VM_SCRIPT
30-
# forward all arguments unprocessed using $@
31-
echo " \\"\\$@\\"" >> $VM_SCRIPT
28+
echo -n " --interactive" >> $VM_SCRIPT
3229
fi
30+
# forward all arguments unprocessed using $@
31+
echo " \\"\\$@\\"" >> $VM_SCRIPT
3332
3433
# make the script executable
3534
chmod +x $VM_SCRIPT

0 commit comments

Comments
 (0)