1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-19 16:38:51 +02:00

(stable) Promote 2021 Week 13

This commit is contained in:
epriestley 2021-03-26 11:04:52 -07:00
commit 7af9846f99
2 changed files with 24 additions and 2 deletions

View file

@ -269,7 +269,29 @@ final class Filesystem extends Phobject {
self::assertReadable($from);
if (phutil_is_windows()) {
execx('copy /Y %s %s', $from, $to);
$trap = new PhutilErrorTrap();
$ok = @copy($from, $to);
$err = $trap->getErrorsAsString();
$trap->destroy();
if (!$ok) {
if (strlen($err)) {
throw new FilesystemException(
$to,
pht(
'Failed to copy file from "%s" to "%s": %s',
$from,
$to,
$err));
} else {
throw new FilesystemException(
$to,
pht(
'Failed to copy file from "%s" to "%s".',
$from,
$to));
}
}
} else {
execx('cp -p %s %s', $from, $to);
}

View file

@ -12,7 +12,7 @@ final class ArcanistPasteWorkflow
Share and grab text using the Paste application. To create a paste, use the
"--input" flag or provide the text on stdin:
$ cat list_of_ducks.txt | arc paste
$ cat list_of_ducks.txt | arc paste --
$ arc paste --input list_of_ducks.txt
To retrieve a paste, specify the paste ID: