From f1c5205f8d462533d6a9f9bf135cff0132c16075 Mon Sep 17 00:00:00 2001 From: Dawson Hensel Date: Mon, 25 Mar 2024 21:12:47 -0700 Subject: [PATCH] Fix bundle not being read properly --- .gitignore | 1 + main.go | 17 +++++------------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index a820605..d4ef55c 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ Emissary # Builds __debug_* release/ +bundle/ \ No newline at end of file diff --git a/main.go b/main.go index 377ecbc..cec5764 100644 --- a/main.go +++ b/main.go @@ -213,18 +213,11 @@ func setUpLocalSeviceProxies(protectedServiceName string, localServiceProxies ma } func getEmissaryBundle() *string { - bundlePath := utils.CreateEmissaryFileReadPath("./bundle/drawbridge.txt") - // We don't call the file path builder function here because it doesn't work. - _, err := os.Stat(bundlePath) - if os.IsNotExist(err) { - return nil + bundleBytes := utils.ReadFile("./bundle/drawbridge.txt") + if bundleBytes != nil { + bundleData := strings.TrimSpace(string(*bundleBytes)) + return &bundleData } else { - bundleBytes := utils.ReadFile(bundlePath) - if bundleBytes != nil { - bundleData := strings.TrimSpace(string(*bundleBytes)) - return &bundleData - } else { - return nil - } + return nil } }