Skip to content

Commit

Permalink
Fix config file search location
Browse files Browse the repository at this point in the history
Set cwd in launch task to executable parent folder
  • Loading branch information
phwissmann committed Aug 28, 2024
1 parent 372fc28 commit 17937eb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions openem-ingestor/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"mode": "exec",
"program": "${workspaceFolder}/desktop-app/build/bin/openem-ingestor",
"preLaunchTask": "build app",
"cwd": "${workspaceFolder}",
"cwd": "${workspaceFolder}/desktop-app/build/bin",
"env": {}
},
{
Expand All @@ -18,7 +18,7 @@
"mode": "exec",
"program": "${workspaceFolder}/service/build/bin/openem-ingestor",
"preLaunchTask": "build service",
"cwd": "${workspaceFolder}",
"cwd": "${workspaceFolder}/service/build/bin",
"env": {}
}
]
Expand Down
4 changes: 2 additions & 2 deletions openem-ingestor/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "shell",
"command": "cp",
"args": [
"${workspaceFolder}/core/openem-ingestor-config.yaml",
"${workspaceFolder}/desktop-app/openem-ingestor-config.yaml",
"${workspaceFolder}/desktop-app/build/bin/"
]
},
Expand All @@ -15,7 +15,7 @@
"type": "shell",
"command": "cp",
"args": [
"${workspaceFolder}/core/openem-ingestor-config.yaml",
"${workspaceFolder}/service/openem-ingestor-config.yaml",
"${workspaceFolder}/service/build/bin/"
]
},
Expand Down
2 changes: 0 additions & 2 deletions openem-ingestor/core/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ func ReadConfig() error {
userConfigDir, _ := os.UserConfigDir()
viper.AddConfigPath(userConfigDir)

// these paths are mostly for development
viper.AddConfigPath("./")
viper.AddConfigPath("./core")

err := viper.ReadInConfig()
return err
Expand Down

0 comments on commit 17937eb

Please sign in to comment.