What does "only when sourcing script" mean?
See original GitHub issueSteps to reproduce
curl -sSL https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.sh | bash /dev/stdin --version 1.0.0-preview2-002996 --install-dir ~/dotnet
Expected behavior
I understand messages that it prints.
Actual behavior
dotnet-install: Downloading https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/1.0.0-preview2-002996/dotnet-dev-centos-x64.1.0.0-preview2-002996.tar.gz dotnet-install: Extracting zip dotnet-install: Adding to current process PATH: /home/bb/dotnet. Note: This change will be visible only when sourcing script. dotnet-install: Installation finished successfuly.
Environment data
dotnet --info
output:
[bb@bb-centos72-3 ~]$ dotnet --info
-bash: dotnet: command not found
Or, more usefully:
[bb@bb-centos72-3 ~]$ ./dotnet/dotnet --info
.NET Command Line Tools (1.0.0-preview2-002996)
Product Information:
Version: 1.0.0-preview2-002996
Commit SHA-1 hash: cff4f37456
Runtime Environment:
OS Name: centos
OS Version: 7
OS Platform: Linux
RID: centos.7-x64
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:16 (8 by maintainers)
Top Results From Across the Web
What is the difference between executing a Bash script vs ...
Sourcing a script means that it is parsed and executed by the current shell itself. It's as if you typed the contents of...
Read more >What does "source" the bin/activate script mean?
To source a script is to run it in the context of the current shell rather than running it in a new shell....
Read more >Difference between executing a script and sourcing it in Linux
Sourcing a script will run the commands in the current shell process. Executing a script will run the commands in a new shell...
Read more >3.5. Sourcing a File
When a file is sourced (by typing either source filename or . filename at the command line), the lines of code in the...
Read more >What is sourcing a file?
Sourcing a file is nothing but executing the file, more importantly making the changes of the file applicable in the current shell itself,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dazinator the best way is to set the
-InstallDir
(see doc) and add this direcotry to the$PATH
.As alternative create a symlink:
ln -s $installdir/dotnet /usr/local/bin
. Where$installdir
is the given installation directory from above.It’s 2018 and it still does not add to the path, I tried the
chmod +x
, executing asbash ./dotnet-install.sh1
, etc (see referenced issue 9234 above). Can you not give an example that does work in the message?