From d2f50f50f471ae17c79e9186bb7dcf59536fe57c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20M=C3=B6ller?= Date: Thu, 14 Sep 2023 18:06:41 +0200 Subject: [PATCH] Change lib search path --- tools/wasp-cli/cli/wallet/wallet.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/wasp-cli/cli/wallet/wallet.go b/tools/wasp-cli/cli/wallet/wallet.go index 44283311f1..0c89e3638e 100644 --- a/tools/wasp-cli/cli/wallet/wallet.go +++ b/tools/wasp-cli/cli/wallet/wallet.go @@ -5,6 +5,7 @@ import ( "fmt" "os" "path" + "path/filepath" "runtime" iotago "github.com/iotaledger/iota.go/v3" @@ -62,7 +63,8 @@ func getIotaSDKLibName() string { func getIotaSDK() *wasp_wallet_sdk.IOTASDK { // LoadLibrary (windows) and dlLoad (linux) have different search path behaviors // For now, use a relative path - as it will eventually be shipped with a release. - wd, err := os.Getwd() + ex, err := os.Executable() + wd := filepath.Dir(ex) log.Check(err) libPath := path.Join(wd, getIotaSDKLibName())