alroyso 1 yıl önce
ebeveyn
işleme
7a378991ed
1 değiştirilmiş dosya ile 2 ekleme ve 4 silme
  1. 2 4
      scripts/init.dart

+ 2 - 4
scripts/init.dart

@@ -80,14 +80,12 @@ Future<void> downloadAndUnarchiveService() async {
   if (latest['name'].contains('.gz')) {
     final bytes = GZipDecoder().decodeBytes(tempBytes);
     await File(path.join(binDir.path, serviceName)).writeAsBytes(bytes);
+    final filePath = path.join(binDir.path, serviceName);
+    await Process.run('chmod', ['+x', filePath]);
   } else {
     final file = ZipDecoder().decodeBytes(tempBytes).first;
     await File(path.join(binDir.path, file.name)).writeAsBytes(file.content);
   }
-
-  final filePath = path.join(binDir.path, serviceName);
-  await Process.run('chmod', ['+x', filePath]);
-
   await tempFile.delete();
 
   print('Unarchive Success');