Skip to content

Commit 5f1f4a9

Browse files
fix: app starting on windows
1 parent c51e7cc commit 5f1f4a9

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.cursor/rules/cursor.mdc

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

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

1213
## Code Style Guidelines

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)