Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Commit

Permalink
refactor: catch chmod errors
Browse files Browse the repository at this point in the history
  • Loading branch information
zyrouge committed Oct 18, 2021
1 parent 6310ce5 commit 5c9fbb3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/plugins/updater/linux/appimage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,16 @@ class LinuxAppImageUpdater with PlatformUpdater {
await currentExe.create(recursive: true);
await newExeFile.copy(currentExe.path);
await newExeFile.delete(recursive: true);
await Process.run(

final ProcessResult chmodRes = await Process.run(
'chmod',
<String>['+777', '"${currentExe.path}"'],
runInShell: true,
);
if (chmodRes.exitCode != 0) {
throw Exception('Failed to make executable');
}

Logger.of('LinuxAppImageUpdater')
.info('Copied and made AppImage executable at: ${currentExe.path}');

Expand Down

0 comments on commit 5c9fbb3

Please sign in to comment.