Commit e19d05b1 authored by John van Groningen's avatar John van Groningen

Merge branch 'error-for-long-command-lines' into 'master'

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

See merge request !22
parents 2eea5773 5f54e80f
Pipeline #30892 passed with stage
in 1 minute and 7 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