From 5163643ae522b132e26879e47ab286625a35a96e Mon Sep 17 00:00:00 2001 From: Joaquim Guimaraes Date: Thu, 15 Jul 2021 00:59:48 +0100 Subject: [PATCH] Fixes forks path detection on macOS --- environment_config.yaml | 2 +- lib/config.dart | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/environment_config.yaml b/environment_config.yaml index 75b5ff95..d94b9541 100644 --- a/environment_config.yaml +++ b/environment_config.yaml @@ -6,6 +6,6 @@ environment_config: fields: # set of fields for command version: # key name const: true # optional, default to TRUE - default: 1.5.2 # optional, default value for key, if not provided key will be required during command run + default: 1.5.2.1 # optional, default value for key, if not provided key will be required during command run dotenv: true # optional, default to FALSE, if this field should be added to .env file \ No newline at end of file diff --git a/lib/config.dart b/lib/config.dart index cc2b5f9a..63af161a 100644 --- a/lib/config.dart +++ b/lib/config.dart @@ -291,7 +291,13 @@ Make sure this folder has the same structure as Chia's GitHub repo."""); io.Directory("/usr/lib/${_blockchain.binaryName}-blockchain"); file = "/resources/app.asar.unpacked/daemon/${_blockchain.binaryName}"; } else if (io.Platform.isMacOS) { - chiaRootDir = io.Directory("/Applications/Chia.app/Contents"); + //capitalizes first letter of a string + String capitalize(String input) { + return "${input[0].toUpperCase()}${input.substring(1)}"; + } + + chiaRootDir = io.Directory( + "/Applications/${capitalize(_blockchain.binaryName)}.app/Contents"); file = "/Resources/app.asar.unpacked/daemon/${_blockchain.binaryName}"; }