mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 13:05:22 +02:00
[318372] [dstore][shells] "export" shell command invalid for certain shells
This commit is contained in:
parent
cc2193f725
commit
052baeec64
1 changed files with 8 additions and 1 deletions
|
@ -113,6 +113,8 @@ public class CommandMinerThread extends MinerThread
|
||||||
private OutputHandler _stdOutputHandler;
|
private OutputHandler _stdOutputHandler;
|
||||||
private OutputHandler _stdErrorHandler;
|
private OutputHandler _stdErrorHandler;
|
||||||
private boolean _isShell;
|
private boolean _isShell;
|
||||||
|
private boolean _isCsh = false;
|
||||||
|
|
||||||
private boolean _isDone;
|
private boolean _isDone;
|
||||||
private boolean _isWindows;
|
private boolean _isWindows;
|
||||||
private boolean _isTTY;
|
private boolean _isTTY;
|
||||||
|
@ -261,6 +263,9 @@ public class CommandMinerThread extends MinerThread
|
||||||
{
|
{
|
||||||
isSHonZ = true;
|
isSHonZ = true;
|
||||||
}
|
}
|
||||||
|
else if (theShell.endsWith("/csh") || theShell.endsWith("/bsh")){ //$NON-NLS-1$//$NON-NLS-2$
|
||||||
|
_isCsh = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// In a single-process server, both user.home and HOME don't represent
|
// In a single-process server, both user.home and HOME don't represent
|
||||||
// each client home directory.
|
// each client home directory.
|
||||||
|
@ -666,7 +671,9 @@ public class CommandMinerThread extends MinerThread
|
||||||
input = convertSpecialCharacters(input);
|
input = convertSpecialCharacters(input);
|
||||||
}
|
}
|
||||||
input.getBytes();
|
input.getBytes();
|
||||||
|
if (_isCsh && origInput.startsWith("export ")){ //$NON-NLS-1$
|
||||||
|
input = origInput.replaceAll("export ", "set "); //$NON-NLS-1$//$NON-NLS-2$
|
||||||
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
BufferedWriter writer = _stdOutput;
|
BufferedWriter writer = _stdOutput;
|
||||||
|
|
Loading…
Add table
Reference in a new issue