-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: command that runs ConfigureDotNetForFirstTimeUse #7293
Comments
@blackdwarf what do you think? I've heard this come up a few times.
I don't love either name, but we do need to provide this functionality... |
@piotrpMSFT I've already talked with @MichaelSimons about this a while back. My suggestion was that given that this was a configuration task that we expose this through a more general-purpose I would like to avoid adding a lot of top-level switches for various things and would rather we have top level verbs that can/should contain multiple similar functionalities. |
I'm happy to take a stab at a PR for whatever we decide is the correct thing to do. |
|
if you invoke that command and you had the SKIP_FIRST_RUN env variable set, should we still do the first run? Should we silent skip? Give a warning and return a non-zero error code? @blackdwarf can you pick a verb and define the behavior given my question above? Once that's done, @vcsjones it would be great to get a PR from you. |
My opinion is that I think it should skip anyway, and not error-out. It seems like the environment variable should always take precedence. Since it's external, that is something might be setting it without being aware that this new command is even being used, I would think the environment variable should "win". Example: you have a docker image with .NET Core on it that does a build. DevOps has no idea what the container does inside, but they know they don't want .NET Core's installer to do the first run behavior. No problem, they can put |
As a point, I really, really dislike the idea of this being a top level switch/command. Also @piotrpMSFT my idea was to introduce Thoughts? |
I tend to agree. Perhaps something like |
As @blackdwarf referenced earlier we had discussed this in the past and I had already logged an issue for it - https://github.com/dotnet/cli/issues/3692 |
@vcsjones once @blackdwarf locks the design, are you interested in making a PR? |
@piotrpMSFT yes. I already took a look at what it would take to accomplish this and I don't see any major difficulties. |
@blackdwarf assigning over to you for driving design. Let's try to get a spec out early next week? |
Hi there! Was snooping around after my incredibly ambitious dotnet/cli#5507 (; D) and thought this sounded interesting. It looks like the current call to Am I crazy or would a noop If implementing this with a noop seems janky, what should the approach be? |
Also, don't know if this helps, but I just downloaded I suppose filtering out that exit code is trivially cheaper than a throwaway project :p |
@FLGMwt FYI the new |
Hey guys, what about just |
|
|
In 3.0, there is no nuget prime anymore. |
Steps to reproduce
When building our own custom images that have .NET Core on them, we would like to prime the nuget cache while the OS image is being built. Currently, we do this by having a dummy project.json in a temp directory, then calling
dotnet restore
on it. That way when OS images are spun up, they don't lose ~10-20 seconds.This feels a little "duct-tapish" to me. It would be very handy if there were a specific CLI command that did only this "priming" of the nuget cache.
Expected behavior
A command, such as
--prepare
, that runsConfigureDotNetForFirstTimeUse
. It should be a no-op if the cache is already there. It should also return an exit code of zero so that build scripts / Docker files don't think the image creation failed.Actual behavior
There is no command.
Environment data
dotnet --info
output:.NET Command Line Tools (1.0.0-preview2-003148)
Product Information:
Version: 1.0.0-preview2-003148
Commit SHA-1 hash: 18ca244551
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.12
OS Platform: Darwin
RID: osx.10.11-x64
The text was updated successfully, but these errors were encountered: