Avoid non-POSIX cp flags

Commit 252dcb32 used cp -a, but apparently Solaris doesn't like that.  Use cp
-RPp instead.

Author: Thomas Munro <thomas.munro@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/CA+hUKGL10AoQVMMqgOJ8CTjoz9MLidD8ik2e8PibzLNMz0+aRg@mail.gmail.com
This commit is contained in:
Andres Freund 2023-08-25 06:43:37 -07:00
parent 98976d0ce0
commit 1a4fd77db8
2 changed files with 2 additions and 2 deletions

View File

@ -549,7 +549,7 @@ sub init
}
else
{
@copycmd = qw(cp -a);
@copycmd = qw(cp -RPp);
$expected_exitcode = 0;
}

View File

@ -2355,7 +2355,7 @@ regression_main(int argc, char *argv[],
else
{
#ifndef WIN32
const char *copycmd = "cp -a \"%s\" \"%s/data\"";
const char *copycmd = "cp -RPp \"%s\" \"%s/data\"";
int expected_exitcode = 0;
#else
const char *copycmd = "robocopy /E /NJS /NJH /NFL /NDL /NP \"%s\" \"%s/data\"";