Check if runtimeConfigPath exists before reading the file in IsPortableApp.
If it doesn't exist, then it isn't a portable app.
This commit is contained in:
parent
5684f9933d
commit
9f61ad51aa
1 changed files with 1 additions and 1 deletions
|
@ -170,7 +170,7 @@ namespace Microsoft.DotNet.Cli.Utils
|
|||
? Directory.EnumerateFiles(commandDir).FirstOrDefault(x => x.EndsWith("runtimeconfig.json"))
|
||||
: runtimeConfigPath;
|
||||
|
||||
if (runtimeConfigPath == null)
|
||||
if (runtimeConfigPath == null || !File.Exists(runtimeConfigPath))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue