Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

dnvm global install #393

Merged
merged 1 commit into from
Sep 3, 2015
Merged

dnvm global install #393

merged 1 commit into from
Sep 3, 2015

Conversation

BrennanConroy
Copy link
Member

@@ -82,6 +82,7 @@ $FullVersion="$ProductVersion-$BuildVersion"
Set-Variable -Option Constant "CommandName" ([IO.Path]::GetFileNameWithoutExtension($ScriptPath))
Set-Variable -Option Constant "CommandFriendlyName" ".NET Version Manager"
Set-Variable -Option Constant "DefaultUserDirectoryName" ".dnx"
Set-Variable -Option Constant "DefaultGlobalDirectoryName" "Microsoft DNX"
Copy link
Contributor

Choose a reason for hiding this comment

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

Microsoft\DNX

A globally installed runtime should be at: %ProgramData%\Microsoft\DNX\runtimes\[version]\bin\...

Copy link
Member Author

Choose a reason for hiding this comment

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

There is already a Microsoft DNX from breadcrumbs, so we decided to use that. We could still change if we want to

Copy link
Contributor

Choose a reason for hiding this comment

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

We're synchronizing these folder layouts across a few things over time, so it's best to get everything right now :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm... Ok... We'll have to consider that. /cc @davidfowl

Copy link
Member

Choose a reason for hiding this comment

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

I don't like Microsoft DNX either, but it didn't seem bad enough to do the work to change it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Decision?

Copy link
Contributor

Choose a reason for hiding this comment

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

Leave it Microsoft DNX for now, but we should make sure consider relocating this before RTM to be more consistent with everything else Microsoft :)

@BrennanConroy
Copy link
Member Author

@anurse
Take a look at dnvm.sh please :)

echo " install latest $_DNVM_RUNTIME_SHORT_NAME from feed"
echo " adds $_DNVM_RUNTIME_SHORT_NAME bin to path of current command line"
echo " set installed version as default"
echo " -f|forces force upgrade. Overwrite existing version of $_DNVM_RUNTIME_SHORT_NAME if already installed"
echo " -u|unstable use unstable feed. Installs the $_DNVM_RUNTIME_SHORT_NAME from the unstable feed"
echo " -r|runtime The runtime flavor to install [clr or coreclr] (default: clr)"
echo " -g|global Installs the configured global dnx file location (default: /usr/local/lib/)"
Copy link
Member

Choose a reason for hiding this comment

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

How about something like Installs the latest $_DNVM_RUNTIME_SHORT_NAME in the configured global $_DNVM_RUNTIME_SHORTNAME file location (default: /usr/local/lib current: $DNX_GLOBAL_HOME)

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd remove the default part, just show ($DNX_GLOBAL_HOME). If the user changed the default, they know they changed it :)

@analogrelay
Copy link
Contributor

sh looks ok to me. We're going to need some tests for global install.

@analogrelay
Copy link
Contributor

If this is needed for beta7, I'm willing to give a hesitant :shipit:, but I'd like to see global install tests (which shouldn't be too hard given we have DNX_GLOBAL_HOME) covering the various scenarios: install, install version that already exists, etc.

local answer=
if [ "$acceptSudo" == "0" ]; then
echo "In order to install dnx globally, dnvm will have to temporarily run as root."
read -p "You may be prompted for your password via 'sudo' during this process. Is this alright (y/n): " answer
Copy link
Contributor

Choose a reason for hiding this comment

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

"Is this alright" -> "Is this OK? (y/N)"

(Make the N capitalized and ensure that it is the default when nothing is typed)

@analogrelay
Copy link
Contributor

sh changes look good to me. I think we might want a way for people to force install even if the runtime is installed in a different location. Imagine trying to "promote" a runtime you've already installed locally to the global store... right now we don't have a way to do that other than manually copying the directory.

@BrennanConroy
Copy link
Member Author

Take a look at the windows part?

@analogrelay
Copy link
Contributor

:shipit:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants