Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Nov 20, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Microsoft.Tye.Extensions/Dapr/DaprExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public override Task ProcessAsync(ExtensionContext context, ExtensionConfigurati

// These environment variables are replaced with environment variables
// defined for this service.
Args = $"-app-id {project.Name} -app-port %APP_PORT% -dapr-grpc-port %DAPR_GRPC_PORT% --dapr-http-port %DAPR_HTTP_PORT% --metrics-port %METRICS_PORT% --placement-host-address localhost:{daprPlacementPort}",
Args = $"run -app-id {project.Name} -app-port %APP_PORT% -dapr-grpc-port %DAPR_GRPC_PORT% --dapr-http-port %DAPR_HTTP_PORT% --metrics-port %METRICS_PORT% --placement-host-address localhost:{daprPlacementPort}",
};

// When running locally `-config` specifies a filename, not a configuration name. By convention
Expand Down Expand Up @@ -271,23 +271,23 @@ private string GetDaprExecutablePath()
// Starting with dapr version 11, dapr is installed in user profile/home.
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
var windowsPath = Environment.ExpandEnvironmentVariables("%USERPROFILE%/.dapr/bin/daprd.exe");
var windowsPath = Environment.ExpandEnvironmentVariables("%HOMEDRIVE%/dapr/dapr.exe");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rynowak is there any plan to move dapr.exe outside of the %HOMEDRIVE%?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would think not since it's 1.0.

if (File.Exists(windowsPath))
{
return windowsPath;
}
}
else
{
var nixpath = Environment.ExpandEnvironmentVariables("%HOME%/.dapr/bin/daprd");
var nixpath = "/usr/local/bin/dapr";
if (File.Exists(nixpath))
{
return nixpath;
}
}

// Older version of dapr don't have dapr in the bin directory, but it is usually on the path.
return "daprd";
return "dapr";
}
}
}