@@ -15,13 +15,28 @@ type InstallationConfiguration struct {
1515}
1616
1717func (i * InstallationConfiguration ) ExecutableFilePath () string {
18- return filepath .Join (os .TempDir (), i .WorkingDirName , i .ExecutableFile )
18+ basePath := os .TempDir ()
19+ homeDir , err := os .UserHomeDir ()
20+ if err == nil {
21+ basePath = homeDir + "/.checkmarx/"
22+ }
23+ return filepath .Join (basePath , i .WorkingDirName , i .ExecutableFile )
1924}
2025
2126func (i * InstallationConfiguration ) HashFilePath () string {
22- return filepath .Join (os .TempDir (), i .WorkingDirName , i .HashFileName )
27+ basePath := os .TempDir ()
28+ homeDir , err := os .UserHomeDir ()
29+ if err == nil {
30+ basePath = homeDir + "/.checkmarx/"
31+ }
32+ return filepath .Join (basePath , i .WorkingDirName , i .HashFileName )
2333}
2434
2535func (i * InstallationConfiguration ) WorkingDir () string {
26- return filepath .Join (os .TempDir (), i .WorkingDirName )
36+ basePath := os .TempDir ()
37+ homeDir , err := os .UserHomeDir ()
38+ if err == nil {
39+ basePath = homeDir + "/.checkmarx/"
40+ }
41+ return filepath .Join (basePath , i .WorkingDirName )
2742}
0 commit comments