Notify if global.json was not found in the root directory.#344
Conversation
| } | ||
| DotnetCoreInstaller.addToPath(); | ||
| } else { | ||
| core.warning('No .NET versions were specified to be installed.'); |
There was a problem hiding this comment.
Wouldn't it be more informative to change the logging level in line 45 from debug to info? And add an else statement after the line 49 to incorporate another info log with text like that "global.json file isn't found. No version was specified to be installed."
There was a problem hiding this comment.
I can do it. Instead of this warning I added?
There was a problem hiding this comment.
I added an info (how about I make it a warning instead? It indicates the user might have done something wrong) if the global.json in the root wasn't found, and removed the warning I previously added. I kept the severity of the debug message you mentioned; better not emit any more diagnostics in the happy path. Let me know what you think.
There was a problem hiding this comment.
About keeping debug level, I think you're right - there is no need to spam customers if their intention is not to use dotnet-version and global-json-file inputs. As for the changing info to warning I think it'll be an overkill because some of our customers use action just for authentication (without need for SDK installation), so the info is enough in my opinion.
There was a problem hiding this comment.
Great. Can you approve again the CI?
There was a problem hiding this comment.
To solve issues with CI, just update the dotnet-installer scripts using: npm run update-installers and in the workflow.yml in the test-proxy job change this image: datadog/squid:latest to image: ubuntu/squid:latest.
|
May I also ask you to resolve 5 failing checks? If you wonder how to do this, there is the documentation for contributors. |
a8fd234 to
9984a6f
Compare
global.json was not found in the root directory.
Description:
I was investigating a bug where my workflow was installing .NET through this action, with the version specified in
global.json. The action finished immediately with no log messages and baffled me until I realized that I was cloning the repository on a subdirectory and had to specify whereglobal.jsonis by myself.This PR adds a message that might have helped me figure this out sooner.
Related issue:
Add link to the related issue.
Check list: