Skip to content

Commit

Permalink
Support passing arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
xtyxtyx committed May 12, 2022
1 parent 4413afa commit ec266da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/flutter_pty.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ class Pty {
// Without this, tools like "vi" produce sequences that are not UTF-8 friendly
effectiveEnv['LANG'] = 'en_US.UTF-8';

const envValuesToCopy = [
const envValuesToCopy = {
'LOGNAME',
'USER',
'DISPLAY',
'LC_TYPE',
'HOME',
'PATH'
];
};

for (var entry in Platform.environment.entries) {
if (envValuesToCopy.contains(entry.key)) {
Expand Down
2 changes: 1 addition & 1 deletion src/flutter_pty.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ PtyHandle *pty_create(PtyOptions *options)

if (pid == 0)
{
int ok = execvp(options->executable, NULL);
int ok = execvp(options->executable, options->arguments);

if (ok < 0)
{
Expand Down

0 comments on commit ec266da

Please sign in to comment.