Skip to content

Commit a0921c7

Browse files
authored
Fix scheduler address for dapr run with file on Windows (#1497)
Signed-off-by: Anton Troshin <[email protected]>
1 parent 6c9bcc6 commit a0921c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/run.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,8 @@ func executeRun(runTemplateName, runFilePath string, apps []runfileconfig.App) (
510510
// Set defaults if zero value provided in config yaml.
511511
app.RunConfig.SetDefaultFromSchema()
512512

513+
app.RunConfig.SchedulerHostAddress = validateSchedulerHostAddress(daprVer.RuntimeVersion, app.RunConfig.SchedulerHostAddress)
514+
513515
// Validate validates the configs and modifies the ports to free ports, appId etc.
514516
err := app.RunConfig.Validate()
515517
if err != nil {
@@ -527,8 +529,6 @@ func executeRun(runTemplateName, runFilePath string, apps []runfileconfig.App) (
527529
break
528530
}
529531

530-
runConfig.SchedulerHostAddress = validateSchedulerHostAddress(daprVer.RuntimeVersion, runConfig.SchedulerHostAddress)
531-
532532
// Combined multiwriter for logs.
533533
var appDaprdWriter io.Writer
534534
// appLogWriter is used when app command is present.
@@ -674,7 +674,7 @@ func validateSchedulerHostAddress(version, address string) string {
674674
// If no SchedulerHostAddress is supplied, set it to default value.
675675
if semver.Compare(fmt.Sprintf("v%v", version), "v1.15.0-rc.0") == 1 {
676676
if address == "" {
677-
return "localhost:50006"
677+
return "localhost"
678678
}
679679
}
680680
return address

0 commit comments

Comments
 (0)