Skip to content

Commit a1f3f87

Browse files
BugFix: Fix task being null in download command
1 parent 4a7abfd commit a1f3f87

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

src/Commands/DownloadModelCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
6565

6666
// Download the model
6767
try {
68-
$task = Task::tryFrom($task);
68+
$task = $task ? Task::tryFrom($task) : null;
6969

7070
if ($task != null) {
7171
pipeline($task, $model);

src/Utils/Hub.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ public static function getFile(
120120
rename($partPath, $filePath);
121121
}
122122

123-
chmod($filePath, 0644);
124-
125123
return $filePath;
126124
} catch (GuzzleException $e) {
127125
self::handleException($e->getCode(), $remoteURL, $fatal);

0 commit comments

Comments
 (0)