From a725b23a92db1d2239164beda2812ecca055510f Mon Sep 17 00:00:00 2001 From: Hitesh Madgulkar <212497904+cx-hitesh-madgulkar@users.noreply.github.com> Date: Wed, 5 Nov 2025 13:12:58 +0530 Subject: [PATCH] changed-file-path-to-download-vorpal-sca-resolver --- .../osinstaller/os-installer-structs.go | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/internal/services/osinstaller/os-installer-structs.go b/internal/services/osinstaller/os-installer-structs.go index 69397bde9..12f61cc52 100644 --- a/internal/services/osinstaller/os-installer-structs.go +++ b/internal/services/osinstaller/os-installer-structs.go @@ -15,13 +15,28 @@ type InstallationConfiguration struct { } func (i *InstallationConfiguration) ExecutableFilePath() string { - return filepath.Join(os.TempDir(), i.WorkingDirName, i.ExecutableFile) + basePath := os.TempDir() + homeDir, err := os.UserHomeDir() + if err == nil { + basePath = homeDir + "/.checkmarx/" + } + return filepath.Join(basePath, i.WorkingDirName, i.ExecutableFile) } func (i *InstallationConfiguration) HashFilePath() string { - return filepath.Join(os.TempDir(), i.WorkingDirName, i.HashFileName) + basePath := os.TempDir() + homeDir, err := os.UserHomeDir() + if err == nil { + basePath = homeDir + "/.checkmarx/" + } + return filepath.Join(basePath, i.WorkingDirName, i.HashFileName) } func (i *InstallationConfiguration) WorkingDir() string { - return filepath.Join(os.TempDir(), i.WorkingDirName) + basePath := os.TempDir() + homeDir, err := os.UserHomeDir() + if err == nil { + basePath = homeDir + "/.checkmarx/" + } + return filepath.Join(basePath, i.WorkingDirName) }