Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[[ Bug 22942 ]] Ensure the shellcommand defaults to COMSPEC on Windows #7454
Conversation
|
With this patch there is the possibility that In
This will cause an error to be thrown if the shellCommand is empty - rather than it trying to run launch a process with a malformed command line (which will probably fail anyway, but this stops the attempt!). |
| @@ -1534,8 +1534,8 @@ struct MCWindowsDesktop: public MCSystemInterface, public MCWindowsSystemService | |||
| } | |||
| } | |||
|
|
|||
| // On NT systems 'cmd.exe' is the command processor | |||
| MCValueAssign(MCshellcmd, MCSTR("cmd.exe")); | |||
| // On NT systems use the env var COMSPEC (= C:\Windows\System32\cmd.exe) | |||
runrevmark
Oct 16, 2020
Contributor
/* Default the shellCommand to the value of the COMSPEC environment
* variable. */
/* Default the shellCommand to the value of the COMSPEC environment
* variable. */
| // On NT systems 'cmd.exe' is the command processor | ||
| MCValueAssign(MCshellcmd, MCSTR("cmd.exe")); | ||
| // On NT systems use the env var COMSPEC (= C:\Windows\System32\cmd.exe) | ||
| MCS_getenv(MCSTR("COMSPEC"), MCshellcmd); |
runrevmark
Oct 16, 2020
Contributor
So we should use MCValueAssign here like elsewhere:
MCAutoStringRef t_comspec;
if (MCS_getenv(MCSTR("COMSPEC"), &t_comspec))
{
MCValueAssign(MCshellcmd, *t_comspec);
}
else
{
MCValueAssign(MCshellcmd, kMCEmptyString);
}
So we should use MCValueAssign here like elsewhere:
MCAutoStringRef t_comspec;
if (MCS_getenv(MCSTR("COMSPEC"), &t_comspec))
{
MCValueAssign(MCshellcmd, *t_comspec);
}
else
{
MCValueAssign(MCshellcmd, kMCEmptyString);
}
| @@ -22,8 +22,8 @@ set the shellCommand to "/bin/sh/ksh" | |||
| Value: | |||
| The <shellCommand> is a string. | |||
| By default, the <shellCommand> <property> is set to "/bin/sh" (the | |||
| Bourne shell) on <Unix|Unix systems>, and "command.com" on Windows | |||
| systems. | |||
| Bourne shell) on <Unix|Unix systems>, and to the environment variable "COMSPEC" on Windows | |||
runrevmark
Oct 16, 2020
Contributor
and to the value of the COMSPEC environment variable on Windows systems.
(I don't think there's a need to say anymore than that).
Should Windows be referred to like <Windows|Windows systems> as it is for Unix?
and to the value of the COMSPEC environment variable on Windows systems.
(I don't think there's a need to say anymore than that).
Should Windows be referred to like <Windows|Windows systems> as it is for Unix?
| @@ -0,0 +1 @@ | |||
| # Ensure the shellcommand defaults to COMSPEC on Windows | |||
runrevmark
Oct 16, 2020
Contributor
shellCommand
shellCommand
b4d40db
to
d8cb11f
|
@livecode-vulcan review ok d8cb11f |
|
|
[[ Bug 22942 ]] Ensure the shellcommand defaults to COMSPEC on Windows Goes together with livecode/livecode-ide#2145
|
9bd23b2
into
livecode:develop-9.6
Goes together with livecode/livecode-ide#2145