diff --git a/lib/cli/commands/scheduler/scheduler_linux.dart b/lib/cli/commands/scheduler/scheduler_linux.dart index d6acbb7..a126b04 100644 --- a/lib/cli/commands/scheduler/scheduler_linux.dart +++ b/lib/cli/commands/scheduler/scheduler_linux.dart @@ -10,10 +10,10 @@ class SchedulerLinux extends SchedulerManager { String get exePath { //home/linuxbrew/.linuxbrew/Cellar/oto/0.0.273/bin/oto var exe = Platform.resolvedExecutable; - if (exe.contains('.linuxbrew')) { - var rootPath = 'home/linuxbrew/.linuxbrew/Cellar/oto/0.0.273/bin/oto'; - var index = rootPath.indexOf('.linuxbrew'); - rootPath = rootPath.substring(0, index); + final key = '.linuxbrew'; + if (exe.contains(key)) { + var index = exe.indexOf('.linuxbrew'); + var rootPath = exe.substring(0, index); exe = '$rootPath.linuxbrew/bin/${path.basenameWithoutExtension(exe)}'; } return exe;