From 3706bb5f7d46ecc4085f21dc3dfabeeab96b9dab Mon Sep 17 00:00:00 2001 From: antranigv Date: Tue, 5 Apr 2022 15:42:28 +0400 Subject: [PATCH 1/2] WIP: Fix the command length issue Based on tests, looks like in many cases we need more than 120 chars for the cmd variable --- src/unix/vpkGit.Mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/vpkGit.Mod b/src/unix/vpkGit.Mod index 4170ea5..10a727a 100644 --- a/src/unix/vpkGit.Mod +++ b/src/unix/vpkGit.Mod @@ -3,7 +3,7 @@ IMPORT Out, Strings, Platform, vpkEnv; PROCEDURE pull*(url : ARRAY OF CHAR; dst : ARRAY OF CHAR); VAR i : INTEGER; - cmd : ARRAY 120 OF CHAR; + cmd : ARRAY 512 OF CHAR; BEGIN cmd:= "git init "; Strings.Append(dst, cmd); From 3e2a115c73fae795693637efa8a82689848d13fe Mon Sep 17 00:00:00 2001 From: antranigv Date: Tue, 5 Apr 2022 15:55:18 +0400 Subject: [PATCH 2/2] Set the maximum command line char to 2048 The reasoning is because POSIX's requirements, see https://github.com/freebsd/freebsd-src/blob/main/include/limits.h#L72 for more info --- src/unix/vpkGit.Mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/vpkGit.Mod b/src/unix/vpkGit.Mod index 10a727a..f3937f7 100644 --- a/src/unix/vpkGit.Mod +++ b/src/unix/vpkGit.Mod @@ -3,7 +3,7 @@ IMPORT Out, Strings, Platform, vpkEnv; PROCEDURE pull*(url : ARRAY OF CHAR; dst : ARRAY OF CHAR); VAR i : INTEGER; - cmd : ARRAY 512 OF CHAR; + cmd : ARRAY 2048 OF CHAR; BEGIN cmd:= "git init "; Strings.Append(dst, cmd);