Skip to content

Commit

Permalink
Debug - 10
Browse files Browse the repository at this point in the history
  • Loading branch information
docktermj committed Feb 26, 2025
1 parent 7be4ecd commit 9ab4041
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/go-test-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ jobs:
run: mkdir "C:\Temp\sqlite" && copy testdata/sqlite/G2C.db "C:\Temp\sqlite\G2C.db"

- name: Run go test without SENZING_PATH environment variable set
run: |
go test -json -v -p 1 -coverprofile=cover -covermode=atomic -coverpkg=./... ./... 2>&1 | tee "C:\Temp\gotest.log" | gotestfmt
cp cover cover.out
run: go test -json -v -p 1 ./... 2>&1 | tee "C:\Temp\gotest.log" | gotestfmt

- name: Set environment variable
run: |
Expand Down
5 changes: 0 additions & 5 deletions settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,7 @@ func BuildSimpleSettingsUsingMap(attributeMap map[string]string) (string, error)

senzingPath, isSet := os.LookupEnv("SENZING_PATH")
if isSet {
fmt.Printf(">>>>>> Found SENZING_PATH: %s\n", senzingPath)
attributeMap["senzingPath"] = senzingPath
} else {
fmt.Println(">>>>>> Did not find SENZING_PATH")
}

// Add database URL.
Expand Down Expand Up @@ -317,9 +314,7 @@ func buildStruct(attributeMap map[string]string) SzConfiguration {
if !ok {
return result
}

senzingDirectory := getSenzingDirectory(attributeMap)
fmt.Printf(">>>>>> senzingDirectory: %s\n", senzingDirectory)

// Apply attributeMap.

Expand Down
7 changes: 0 additions & 7 deletions settings/settings_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,12 @@ func getResourcePath(senzingDirectory string) string {
func getSenzingDirectory(attributeMap map[string]string) string {
result := `C:\Program Files\senzing\er`
homeDrive, isHomeDriveSet := os.LookupEnv("HOMEDRIVE")

fmt.Printf(">>>>>> HOMEDRIVE: %s\n", homeDrive)

homePath, isHomeDirSet := os.LookupEnv("HOMEPATH")

fmt.Printf(">>>>>> HOMEPATH: %s\n", homePath)

if isHomeDriveSet && isHomeDirSet {
result = fmt.Sprintf("%s%s\\Senzing", homeDrive, homePath)
}
senzingPath, ok := attributeMap["senzingPath"]
if ok {
fmt.Printf(">>>>>> Using SENZING_PATH: %s\n", senzingPath)
result = senzingPath
}
return result
Expand Down

0 comments on commit 9ab4041

Please sign in to comment.