Commit 5f54e80f authored by Camil Staps's avatar Camil Staps 🍃

Add descriptive error when the command line is too long (for large projects in...

Add descriptive error when the command line is too long (for large projects in Clean installations far from the filesystem root)
parent 2eea5773
Pipeline #30772 passed with stage
in 1 minute and 22 seconds
......@@ -899,7 +899,8 @@ compile_with_cache2 path directory arguments compiler_thread_id compiler_thread_
RunExternalCommand :: !String ![String] !String !*GeneralSt -> *(!Int, ![String], !*GeneralSt)
RunExternalCommand cmd args startupdir ps
# command = foldl (\cmd arg -> cmd +++ " " +++ arg) cmd [quoted_string arg \\ arg <- args]
dir = RemoveFilename cmd
| size command >= 32768 = (-1,["Error: command line is too long (consider moving the project to a location closer to the filesystem root): " +++ command % (0,200) +++ "..."],ps)
# dir = RemoveFilename cmd
errorsfilename = tooltempdir +++ DirSeparatorString +++ "errors"
(didit,exit_code,_) = call_process_with_directory_and_redirected_std_error command dir errorsfilename 99
| not didit = abort ("Could not run external command '" +++ command +++ "'\n")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment