question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What does "only when sourcing script" mean?

See original GitHub issue

Steps 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:open
  • Created 7 years ago
  • Reactions:7
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
gfoidlcommented, Jun 5, 2019

@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.

4reactions
bergmeistercommented, May 9, 2018

It’s 2018 and it still does not add to the path, I tried the chmod +x, executing as bash ./dotnet-install.sh1, etc (see referenced issue 9234 above). Can you not give an example that does work in the message?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found