-
Notifications
You must be signed in to change notification settings - Fork 29
Not possible to get the directory path for self-contained executable #56
base: develop
Are you sure you want to change the base?
Conversation
ToolPathResolver.NuGetAssetsConfigFile = NukeBuild.BuildProjectDirectory / "obj" / "project.assets.json"; | ||
ToolPathResolver.NuGetPackagesConfigFile = build.NuGetPackagesConfigFile; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously we tried to assign null to ToolPathResolver.NuGetAssetsConfigFile without checking NukeBuild.BuildProjectDirectory it's not null.
|
||
if (entryAssembly == null | ||
|| entryAssembly.GetTypes().All(x => !x.IsSubclassOf(typeof(NukeBuild))) | ||
|| !EnvironmentInfo.ValidDirectoryPath(entryAssembly.Location)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The self-contained app doesn't have a build project so we will assign null because should be standalone in invoke.
get => ValidDirectoryPath(Directory.GetCurrentDirectory()) | ||
? Directory.GetCurrentDirectory() | ||
: Path.GetDirectoryName(Process.GetCurrentProcess().MainModule?.FileName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a standard approach with valid path(not points to temp path) returns as previous otherwise withdraws path from the process.
5f5fb10
to
6d93e61
Compare
Fixes nuke-build/nuke#330