예제 #1
0
        // marking virtual so it can be mocked
        public virtual async Task <string> GetRuntimesInstalledString()
        {
            // run the command dotnet --list-runtimes and return the result

            var cliCommand = new CliCommand {
                Command   = "dotnet",
                Arguments = Strings.ListRuntimesCommandArgument
            };

            return((await cliCommand.RunCommand()).StandardOutput);
        }
예제 #2
0
        public async Task OpenFolderInFinder(string path, bool verbose)
        {
            var openCommand = new CliCommand {
                Command   = "open",
                Arguments = path
            };

            if (verbose)
            {
                Console.WriteLine($"Opening log folder {path}");
            }

            var cmdresult = await openCommand.RunCommand();

            if (!string.IsNullOrEmpty(cmdresult.StandardError))
            {
                Console.WriteLine($"Error: {cmdresult.StandardError}");
            }
        }