Skip to content

Commit ffe91fb

Browse files
committed
throw exception when fetch alpha can not move the new archive
1 parent 1feecbd commit ffe91fb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Console/Command/KeeperFX/FetchAlphaCommand.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,15 @@ protected function execute(Input $input, Output $output)
234234

235235
// Move new archive
236236
$output->writeln("[>] Moving new archive to: <info>{$output_path}</info>");
237-
\rename($temp_archive_path_new, $output_path);
237+
if(\rename($temp_archive_path_new, $output_path) === false){
238+
throw new \Exception("failed to move file");
239+
}
240+
241+
// Change file permissions
242+
/*$output->writeln("[>] Changing file permissions...");
243+
if(\chmod($output_path, 0777) === false){
244+
throw new \Exception("failed to change file permissions");
245+
}*/
238246

239247
// Get filesize
240248
$output_filesize = \filesize($output_path);

0 commit comments

Comments
 (0)