Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,28 @@ int main(int argc, char** argv)
program_argc = argc - program_args;
program_argv = &argv[program_args];

const std::vector<std::string> files = getSourceFiles(argc, argv);
std::vector<std::string> files;

bool parsingFiles = true;

for (int i = 1; i < argc; i++)
{
if (strcmp(argv[i], "--") == 0)
{
parsingFiles = false; // stop collecting files
program_argc = argc - (i + 1);
program_argv = &argv[i + 1];
break;
}

if (parsingFiles)
files.push_back(std::string(argv[i])); // fix: Explicit conversion
}

if (program_argc == 0) // default to just running the script if no args are passed
{
program_argv = nullptr;
}

// Given the source files, perform a typecheck here
if (runTypecheck)
Expand Down
2 changes: 1 addition & 1 deletion extern/luau/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if(EXT_PLATFORM_STRING)
return()
endif()

cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)

option(LUAU_BUILD_CLI "Build CLI" ON)
option(LUAU_BUILD_TESTS "Build tests" ON)
Expand Down