dotnet-wasi-sdk icon indicating copy to clipboard operation
dotnet-wasi-sdk copied to clipboard

How can you receive command line args?

Open coty-terumo opened this issue 1 year ago • 0 comments

// Program.cs
Console.WriteLine();
string[] arguments = Environment.GetCommandLineArgs();
Console.WriteLine("GetCommandLineArgs: {0}", string.Join(", ", arguments));
dotnet run hello # dotnet run -- hello ; wasmtime <path> hello ; wasmtime <path> -- hello

# GetCommandLineArgs: 

# expected: GetCommandLineArgs: <path>, hello

coty-terumo avatar Jan 08 '24 17:01 coty-terumo