Skip to content

Commit ad23530

Browse files
authored
Merge pull request #26 from onihilist/fix/interactive-commands-fix
FIX : Commands & Scripts interactive fix
2 parents 587bae8 + e8855a5 commit ad23530

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Shell/Commands/CommandParser.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public bool TryExecute(string commandLine, ShellContext context)
101101
var cmdName = parts[0];
102102
var args = parts.Skip(1).ToArray();
103103

104-
if (cmdName.StartsWith("./") || cmdName.StartsWith("/") || cmdName.Contains("/"))
104+
if (cmdName.StartsWith("./"))
105105
{
106106
try
107107
{
@@ -111,9 +111,9 @@ public bool TryExecute(string commandLine, ShellContext context)
111111
{
112112
FileName = "/bin/bash",
113113
Arguments = $"-c \"{commandLine}\"",
114-
RedirectStandardOutput = true,
115-
RedirectStandardError = true,
116-
RedirectStandardInput = true,
114+
RedirectStandardOutput = false,
115+
RedirectStandardError = false,
116+
RedirectStandardInput = false,
117117
UseShellExecute = false,
118118
CreateNoWindow = true
119119
}
@@ -138,7 +138,7 @@ public bool TryExecute(string commandLine, ShellContext context)
138138
}
139139
catch (Exception ex)
140140
{
141-
Console.WriteLine($"[[[red]-[/]]] - Error executing file: {ex.Message}");
141+
AnsiConsole.MarkupLine($"[[[red]-[/]]] - Error executing file: {ex.Message}");
142142
return true;
143143
}
144144
}

0 commit comments

Comments
 (0)