22 lines
646 B
Dart
22 lines
646 B
Dart
// 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 SchedulerOsx extends SchedulerManager {
|
|
@override
|
|
String get exePath {
|
|
var exe = Platform.resolvedExecutable;
|
|
//homebrew로 설치시 예외 처리
|
|
if (exe.startsWith('/usr/local')) {
|
|
//intel mac
|
|
exe = '/usr/local/bin/${path.basenameWithoutExtension(exe)}';
|
|
} else if (exe.startsWith('/opt/homebrew')) {
|
|
//sillicon mac
|
|
exe = '/opt/homebrew/bin/${path.basenameWithoutExtension(exe)}';
|
|
}
|
|
return exe;
|
|
}
|
|
}
|