Skip to content

Commit 2a15749

Browse files
fix: Starting app on windows (#104)
1 parent fc9ee88 commit 2a15749

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.cursor/rules/cursor.mdc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ alwaysApply: true
77
# Your rule content
88

99
## Key Rules
10+
- use full names like e.g. feature, instead of feat
1011
- run go build after each code modification to see if app compiles
1112

1213
## Code Style Guidelines
@@ -22,4 +23,4 @@ alwaysApply: true
2223
- `cmd/`: CLI command implementations
2324
- `config/`: Configuration handling
2425
- `tools/`: Tool-specific implementations
25-
- `utils/`: Utility functions and static - look for static like default file permisson here
26+
- `utils/`: Utility functions and static - look for static like default file permisson here

plugins/runtime-utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"embed"
66
"fmt"
77
"path"
8-
"path/filepath"
98
"runtime"
109
"strings"
1110
"text/template"
@@ -134,7 +133,8 @@ func processRuntime(config RuntimeConfig, runtimesDir string) (*RuntimeInfo, err
134133

135134
// LoadPlugin loads a plugin configuration from the specified plugin directory
136135
func loadPlugin(runtimeName string) (*runtimePlugin, error) {
137-
pluginPath := filepath.Join("runtimes", runtimeName, "plugin.yaml")
136+
// Always use forward slashes for embedded filesystem paths (for windows support)
137+
pluginPath := fmt.Sprintf("runtimes/%s/plugin.yaml", runtimeName)
138138

139139
// Read from embedded filesystem
140140
data, err := pluginsFS.ReadFile(pluginPath)

plugins/tool-utils.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ func ProcessTools(configs []ToolConfig, toolDir string, runtimes map[string]*Run
114114
result := make(map[string]*ToolInfo)
115115

116116
for _, config := range configs {
117-
// Load the tool plugin
118-
pluginPath := filepath.Join("tools", config.Name, "plugin.yaml")
117+
// Load the tool plugin - always use forward slashes for embedded filesystem paths (for windows support)
118+
pluginPath := fmt.Sprintf("tools/%s/plugin.yaml", config.Name)
119119

120120
// Read from embedded filesystem
121121
data, err := toolsFS.ReadFile(pluginPath)
@@ -321,7 +321,8 @@ func GetSupportedTools() (map[string]struct{}, error) {
321321
}
322322

323323
toolName := entry.Name()
324-
pluginPath := filepath.Join("tools", toolName, "plugin.yaml")
324+
// Always use forward slashes for embedded filesystem paths
325+
pluginPath := fmt.Sprintf("tools/%s/plugin.yaml", toolName)
325326

326327
// Check if plugin.yaml exists
327328
_, err := toolsFS.ReadFile(pluginPath)

0 commit comments

Comments
 (0)