mirror of https://github.com/dapr/cli.git
Fix scheduler address for dapr run with file on Windows
Signed-off-by: Anton Troshin <anton@diagrid.io>
This commit is contained in:
parent
6c9bcc6dcf
commit
69462f50cb
|
@ -510,6 +510,8 @@ func executeRun(runTemplateName, runFilePath string, apps []runfileconfig.App) (
|
||||||
// Set defaults if zero value provided in config yaml.
|
// Set defaults if zero value provided in config yaml.
|
||||||
app.RunConfig.SetDefaultFromSchema()
|
app.RunConfig.SetDefaultFromSchema()
|
||||||
|
|
||||||
|
app.RunConfig.SchedulerHostAddress = validateSchedulerHostAddress(daprVer.RuntimeVersion, app.RunConfig.SchedulerHostAddress)
|
||||||
|
|
||||||
// Validate validates the configs and modifies the ports to free ports, appId etc.
|
// Validate validates the configs and modifies the ports to free ports, appId etc.
|
||||||
err := app.RunConfig.Validate()
|
err := app.RunConfig.Validate()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -527,8 +529,6 @@ func executeRun(runTemplateName, runFilePath string, apps []runfileconfig.App) (
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
runConfig.SchedulerHostAddress = validateSchedulerHostAddress(daprVer.RuntimeVersion, runConfig.SchedulerHostAddress)
|
|
||||||
|
|
||||||
// Combined multiwriter for logs.
|
// Combined multiwriter for logs.
|
||||||
var appDaprdWriter io.Writer
|
var appDaprdWriter io.Writer
|
||||||
// appLogWriter is used when app command is present.
|
// appLogWriter is used when app command is present.
|
||||||
|
@ -674,7 +674,7 @@ func validateSchedulerHostAddress(version, address string) string {
|
||||||
// If no SchedulerHostAddress is supplied, set it to default value.
|
// If no SchedulerHostAddress is supplied, set it to default value.
|
||||||
if semver.Compare(fmt.Sprintf("v%v", version), "v1.15.0-rc.0") == 1 {
|
if semver.Compare(fmt.Sprintf("v%v", version), "v1.15.0-rc.0") == 1 {
|
||||||
if address == "" {
|
if address == "" {
|
||||||
return "localhost:50006"
|
return "localhost"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return address
|
return address
|
||||||
|
|
Loading…
Reference in New Issue