Skip to content

Commit

Permalink
fix: linux: false missing sudoers.d warning on non-Dell machines
Browse files Browse the repository at this point in the history
alexVinarskis committed Dec 28, 2023
1 parent 6013dc4 commit f8728e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/classes/sudoers_manager.dart
Original file line number Diff line number Diff line change
@@ -13,8 +13,8 @@ class SudoersManager {
ProcessResult pr;
if (Platform.isLinux) {
// (Linux) Verify that cctk bin was added to sudoers
pr = (await _shell.run('''bash -c "export PATH="${Constants.apiPathLinux}:\$PATH" && [[ \$(sudo -n \$(which cctk) 2>/dev/null) != '' ]]"'''))[0];
runningSudo = pr.exitCode == 0;
pr = (await _shell.run('''bash -c "export PATH="${Constants.apiPathLinux}:\$PATH" && sudo -n \$(which cctk) 2>/dev/null"'''))[0];
runningSudo = pr.exitCode != 1;
} else {
// (Windows) Verify that app is running as admin
pr = (await _shell.run('''cmd /c cmd /c "${Constants.apiPathWindows}"'''))[0];

0 comments on commit f8728e1

Please sign in to comment.