Closed Sherry520 closed 2 months ago
When I read this section 10-git-internals/sections/environment.asc, I know why there is this error, and what I really need to do is change the environment variable GIT_EXEC_PATH
, not PATH
.
Therefore, I recommend revising this section and stating in advance that this will be covered in more detail in subsequent chapters.
In your reproduction, you typed this:
export PAHT=~:$PATH
Is this typo the source of your issue? Because I'm able to do this:
$ echo $PATH
# (includes ~/bin)
$ cat > ~/bin/git-test-command
#!/bin/sh
echo hello git
^D
$ chmod a+x ~/bin/git-test-command
$ git test-command
hello git
$
@ben Yes, it's weird. Now I can modify PATH
to run the commend without modifying GIT_EXEC_PATH
, maybe because I didn't have ruby installed before. But now there's another error, unless I change File.exists?
to File.exist?
.
Yup, looks like File.exists?
was deprecated in Ruby 2.2, and removed in Ruby 3.2. You probably ended up with a 3.3 Ruby. If you'd like to submit a PR that fixes that line I'd accept it.
There's no existing/similar bug report.
This report is about a single actionable bug.
This report is about the ProGit book, version 2, English language.
Bug covers book website/pdf
Problem is present in the Pro Git book on the website?
Which version of the book is affected?
Source files
Describe the bug:
In section "Git Tools" -> "Credential Storage" -> "A Custom Credential Cache" When I run the command
git credential-read-only --file=./ get
, error occured:git: 'credential-read-only' is not a git command. See 'git --help'.
Steps to reproduce:
vim git-credential-read-only
paste the following code as show in section "Git Tools" -> "Credential Storage" -> "A Custom Credential Cache"
export PAHT=~:$PATH
git credential-read-only --file=git.store get
See error
Expected behavior:
In my case, it doesn't show the input and occurred error.
Screenshots:
No response
Additional context:
No response
Device
No response
Operating system
No response
Browser/application + version
No response