When running the install.php script to install MediaWiki from the terminal (as opposed to the web installer wizard), any parameter that isn't specified defaults to the values defined in DefaultSettings.php.
In the case of the scriptpath option, this doesn't work out of the box, unless the server has previously been configured to use the route /wiki (the default value of $wgScriptPath).
To make installer.php work out of the box, the default value for the scriptpath option should be MediaWiki's core directory, which at least would work without any special configurations on the server.
This is similar to what the web installer does already (see envCheckPath() at includes/installer/WebInstaller.php#L1153), so this change would also improve consistency between the installers.
(Note: I'm creating this task retroactively, to accompany the Gerrit patch 133222.)