process update
This commit is contained in:
parent
609efc6b51
commit
6a99f29695
1 changed files with 5 additions and 4 deletions
|
|
@ -31,7 +31,8 @@ class ProcessData {
|
|||
ProcessData(this._enableStdout, this._enableStderr,
|
||||
{LogHandler? logHandler, Converter<List<int>, String>? decoder}) {
|
||||
_logHandler = logHandler;
|
||||
_decoder = decoder ?? utf8.decoder;
|
||||
_decoder =
|
||||
Platform.isWindows ? SystemEncoding().decoder : decoder ?? utf8.decoder;
|
||||
}
|
||||
|
||||
bool get isSuccess {
|
||||
|
|
@ -225,10 +226,10 @@ class ProcessExecutor {
|
|||
await file.delete();
|
||||
}
|
||||
file.createSync();
|
||||
file.writeAsStringSync(shell.toString());
|
||||
file.writeAsStringSync(shell.toString(), flush: true);
|
||||
try {
|
||||
processData.process = await Process.start('cmd', ['/C', file.path],
|
||||
workingDirectory: workspace, runInShell: false);
|
||||
processData.process = await Process.start(
|
||||
'powershell.exe', ['-NoProfile', '-File', file.absolute.path]);
|
||||
} on Exception catch (e) {
|
||||
logHandler ?? (e, LogType.error);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue