Added tests. There are no tests for the interactive part of the UI (confirm/customize/cancel).
$ ./dfxvm-init
Welcome to dfxvm!
This will install dfxvm, and download and install dfx.
The dfxvm and dfx commands will be added to the following directory:
/Users/ericswanson/Library/Application Support/org.dfinity.dfx/bin
Current installation options:
dfx version: latest
Proceed with installation?: Customize installation
I'm going to ask you the value of each of these installation options.
You may simply press the Enter key to leave unchanged.
dfx version?: 0.15.0
Current installation options:
dfx version: 0.15.0
Proceed with installation?: Customize installation
I'm going to ask you the value of each of these installation options.
You may simply press the Enter key to leave unchanged.
dfx version?: latest
Current installation options:
dfx version: latest
Proceed with installation?: Proceed with installation (default)
info: creating /Users/ericswanson/Library/Application Support/org.dfinity.dfx/env
info: fetching https://sdk.dfinity.org/manifest.json
info: latest dfx version is 0.15.2
info: installing dfx 0.15.2
info: downloading https://github.com/dfinity/sdk/releases/download/0.15.2/dfx-0.15.2-x86_64-darwin.tar.gz.sha256
[00:00:01] [#################################################################################################################################################################] 98B/98B (57B/s, 0s)
info: downloaded https://github.com/dfinity/sdk/releases/download/0.15.2/dfx-0.15.2-x86_64-darwin.tar.gz.sha256
info: downloading https://github.com/dfinity/sdk/releases/download/0.15.2/dfx-0.15.2-x86_64-darwin.tar.gz
[00:00:07] [#####################################################################################################################################################] 92.19MB/92.19MB (12.89MB/s, 0s)
info: downloaded https://github.com/dfinity/sdk/releases/download/0.15.2/dfx-0.15.2-x86_64-darwin.tar.gz
info: verified checksum 6cef69b91234780c8f32677478d521dddcc2306b5638b5766174923c553bc0a5
info: extracted archive
info: installed dfx 0.15.2
info: set default version to dfx 0.15.2
dfxvm is installed now.
The installation process doesn't yet update profile scripts
to add the dfxvm bin directory to your $PATH.
To configure your shell, run:
source "$HOME/Library/Application Support/org.dfinity.dfx/env"
$
Checklist:
[x] I have edited the CHANGELOG accordingly.
[x] I have made corresponding changes to the documentation in docs/cli-reference.
Description
Installs dfxvm and the selected version of dfx. Does not:
Fixes https://dfinity.atlassian.net/browse/SDK-1274
How Has This Been Tested?
Added tests. There are no tests for the interactive part of the UI (confirm/customize/cancel).
Checklist: