TShell.ClearEnvironment#
Remove todas as variáveis de ambiente, comuns e secretas, adicionadas à configuração.
Declaração#
function ClearEnvironment(): TShell;Exemplo#
program Exemplo;
uses Odisseia.Process;
var
Shell: TShell;
begin
Shell := TShell.Create;
Shell.Executable := Config.GetString('SHELL_EXECUTABLE');
Shell.Command := 'echo hello';
Shell.AddEnvironment('LANG', 'C');
Shell.ClearEnvironment;
end.A limpeza não altera o profile, o comando, a entrada nem as demais propriedades.