@@ -279,12 +279,24 @@ func (m *ActivationManager) generatePosixScript(config ActivationConfig) (*Activ
279279 // Add shims directory to PATH
280280 sb .WriteString ("# Add UniRTM shims to PATH\n " )
281281 // Clean up existing shims from PATH to avoid duplicates
282- sb .WriteString (fmt .Sprintf (`export PATH="%s:$(echo "$PATH" | sed -E 's|%s:?||g' | sed 's|:$||')"` + "\n " , config .ShimsDir , config .ShimsDir ))
282+ posixShimsDir := config .ShimsDir
283+ if runtime .GOOS == "windows" {
284+ posixShimsDir = filepath .ToSlash (posixShimsDir )
285+ }
286+ sb .WriteString (fmt .Sprintf (`export PATH="%s:$(echo "$PATH" | sed -E 's|%s:?||g' | sed 's|:$||')"` + "\n " , posixShimsDir , posixShimsDir ))
283287 sb .WriteString ("\n " )
284288 } else if len (config .InjectedPaths ) > 0 {
285289 // PATH mode activation
286290 sb .WriteString ("# UniRTM PATH mode activation\n " )
287- injectedPath := strings .Join (config .InjectedPaths , string (os .PathListSeparator ))
291+ var posixPaths []string
292+ for _ , p := range config .InjectedPaths {
293+ if runtime .GOOS == "windows" {
294+ posixPaths = append (posixPaths , filepath .ToSlash (p ))
295+ } else {
296+ posixPaths = append (posixPaths , p )
297+ }
298+ }
299+ injectedPath := strings .Join (posixPaths , ":" )
288300
289301 // Use UNIRTM_PATH to track injected paths.
290302 // Use a shell loop to filter out existing UNIRTM-managed entries from PATH,
0 commit comments