update exe path
This commit is contained in:
parent
f07c4ef238
commit
3daf42c970
3 changed files with 16 additions and 6 deletions
|
|
@ -9,9 +9,6 @@ import 'package:oto_cli/cli/commands/command_exe.dart';
|
|||
void main(List<String> arguments) async {
|
||||
await initialize('oto', 'com.toki-labs.oto');
|
||||
|
||||
CLI.initialize('oto', arguments, [
|
||||
CommandTemplate(),
|
||||
CommandExe(),
|
||||
CommandScheduler()
|
||||
]);
|
||||
CLI.initialize(
|
||||
'oto', arguments, [CommandTemplate(), CommandExe(), CommandScheduler()]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,21 @@
|
|||
// ignore_for_file: depend_on_referenced_packages
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:oto_cli/cli/commands/scheduler/scheduler_manager.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
class SchedulerLinux extends SchedulerManager {
|
||||
@override
|
||||
String get exePath {
|
||||
return Platform.resolvedExecutable;
|
||||
//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);
|
||||
exe = '$rootPath.linuxbrew/bin/${path.basenameWithoutExtension(exe)}';
|
||||
}
|
||||
return exe;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// ignore_for_file: depend_on_referenced_packages
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:oto_cli/cli/commands/scheduler/scheduler_manager.dart';
|
||||
|
|
|
|||
Loading…
Reference in a new issue