GitFileTree - Git command not found (is which shell startup script is run when pharo launched from UI)
Hi, I wanted to give a try to gitfiletree but I got a 'Git command not found'. Indeed, the git command is not in the path Here is the code used by GitFileTree to run a git command: | c output | [ c := PipeableOSProcess command: 'export'. output := ReadStream on: c output. c succeeded ifFalse: [ self error: 'Git error: ' , c errorPipelineContents ] ] ensure: [ c closePipes ]. output I replaced the command to execute by 'export' to get all environment variables. I noticed that '/usr/local/bin' is not in the path (used by brew). To get my full environment (.profile executed), I need to run pharo from a shell with the same environment. The question is: how to run Pharo from the UI and get this environment? I tried with a .bashrc, bash_profile without success. Any idea? Thanks, Christophe.
Hi, Both .bashrc and .bash_profile are directly bound to shell (bash shell) so this will not help. I do not know MacOS, so I'm not sure if there is some GUI configuration like in MS Windows, so someone else might clarify. In the meantime there is also an alternative way - create a custom launcher where you set the path explicitly... i.e. PATH=$PATH:/usr/local/bin ./pharo pharo.image (or however you start your pharo instance). Peter On Tue, Feb 3, 2015 at 4:08 PM, Christophe Demarey < Christophe.Demarey@inria.fr> wrote:
Hi,
I wanted to give a try to gitfiletree but I got a 'Git command not found'. Indeed, the git command is not in the path Here is the code used by GitFileTree to run a git command:
| c output | [ c := PipeableOSProcess command: 'export'. output := ReadStream on: c output. c succeeded ifFalse: [ self error: 'Git error: ' , c errorPipelineContents ] ] ensure: [ c closePipes ]. output
I replaced the command to execute by 'export' to get all environment variables. I noticed that '/usr/local/bin' is not in the path (used by brew).
To get my full environment (.profile executed), I need to run pharo from a shell with the same environment. The question is: how to run Pharo from the UI and get this environment? I tried with a .bashrc, bash_profile without success. Any idea?
Thanks, Christophe.
Hi, On Tue, Feb 3, 2015 at 4:21 PM, Peter Uhnák <i.uhnak@gmail.com> wrote:
Hi,
Both .bashrc and .bash_profile are directly bound to shell (bash shell) so this will not help. I do not know MacOS, so I'm not sure if there is some GUI configuration like in MS Windows, so someone else might clarify.
another possibility on OS X is to put the correct path in .bashrc and then start Pharo from a Terminal via the command 'open Pharo.app'. Adjust Pharo.app to the name of the Pharo application bundle on your machine. This is not a perfect solution but it works. There is also a special file on OS X where you supposedly can add things like a $PATH variable for graphical programs. Unfortunately I don't remember the name of that file. Best, Manfred
In the meantime there is also an alternative way - create a custom launcher where you set the path explicitly... i.e. PATH=$PATH:/usr/local/bin ./pharo pharo.image (or however you start your pharo instance).
Peter
On Tue, Feb 3, 2015 at 4:08 PM, Christophe Demarey < Christophe.Demarey@inria.fr> wrote:
Hi,
I wanted to give a try to gitfiletree but I got a 'Git command not found'. Indeed, the git command is not in the path Here is the code used by GitFileTree to run a git command:
| c output | [ c := PipeableOSProcess command: 'export'. output := ReadStream on: c output. c succeeded ifFalse: [ self error: 'Git error: ' , c errorPipelineContents ] ] ensure: [ c closePipes ]. output
I replaced the command to execute by 'export' to get all environment variables. I noticed that '/usr/local/bin' is not in the path (used by brew).
To get my full environment (.profile executed), I need to run pharo from a shell with the same environment. The question is: how to run Pharo from the UI and get this environment? I tried with a .bashrc, bash_profile without success. Any idea?
Thanks, Christophe.
here some info I found http://serverfault.com/questions/16355/how-to-set-global-path-on-os-x On Wed, Feb 4, 2015 at 12:28 AM, Manfred Kröhnert < mkroehnert42@googlemail.com> wrote:
Hi,
On Tue, Feb 3, 2015 at 4:21 PM, Peter Uhnák <i.uhnak@gmail.com> wrote:
Hi,
Both .bashrc and .bash_profile are directly bound to shell (bash shell) so this will not help. I do not know MacOS, so I'm not sure if there is some GUI configuration like in MS Windows, so someone else might clarify.
another possibility on OS X is to put the correct path in .bashrc and then start Pharo from a Terminal via the command 'open Pharo.app'. Adjust Pharo.app to the name of the Pharo application bundle on your machine. This is not a perfect solution but it works.
There is also a special file on OS X where you supposedly can add things like a $PATH variable for graphical programs. Unfortunately I don't remember the name of that file.
Best, Manfred
In the meantime there is also an alternative way - create a custom launcher where you set the path explicitly... i.e. PATH=$PATH:/usr/local/bin ./pharo pharo.image (or however you start your pharo instance).
Peter
On Tue, Feb 3, 2015 at 4:08 PM, Christophe Demarey < Christophe.Demarey@inria.fr> wrote:
Hi,
I wanted to give a try to gitfiletree but I got a 'Git command not found'. Indeed, the git command is not in the path Here is the code used by GitFileTree to run a git command:
| c output | [ c := PipeableOSProcess command: 'export'. output := ReadStream on: c output. c succeeded ifFalse: [ self error: 'Git error: ' , c errorPipelineContents ] ] ensure: [ c closePipes ]. output
I replaced the command to execute by 'export' to get all environment variables. I noticed that '/usr/local/bin' is not in the path (used by brew).
To get my full environment (.profile executed), I need to run pharo from a shell with the same environment. The question is: how to run Pharo from the UI and get this environment? I tried with a .bashrc, bash_profile without success. Any idea?
Thanks, Christophe.
Hi Christophe, looks like that a configuration option for the path to the git command is necessary :) https://github.com/dalehenrich/filetree/issues/143 I'm planning a bit of a rewrite for GitFileTree (saw a few significant issues on Monticello to git integration pop-up recently) and I'll add that along with the others. Thierry 2015-02-03 16:08 GMT+01:00 Christophe Demarey <Christophe.Demarey@inria.fr>:
Hi,
I wanted to give a try to gitfiletree but I got a 'Git command not found'. Indeed, the git command is not in the path Here is the code used by GitFileTree to run a git command:
| c output | [ c := PipeableOSProcess command: 'export'. output := ReadStream on: c output. c succeeded ifFalse: [ self error: 'Git error: ' , c errorPipelineContents ] ] ensure: [ c closePipes ]. output
I replaced the command to execute by 'export' to get all environment variables. I noticed that '/usr/local/bin' is not in the path (used by brew).
To get my full environment (.profile executed), I need to run pharo from a shell with the same environment. The question is: how to run Pharo from the UI and get this environment? I tried with a .bashrc, bash_profile without success. Any idea?
Thanks, Christophe.
Hi Thierry, ----- Mail original -----
De: "Thierry Goubier" <thierry.goubier@gmail.com> Ã: "Pharo Development List" <pharo-dev@lists.pharo.org> Envoyé: Mardi 3 Février 2015 18:51:05 Objet: Re: [Pharo-dev] GitFileTree - Git command not found (is which shell startup script is run when pharo launched from UI)
Hi Christophe,
looks like that a configuration option for the path to the git command is necessary :) https://github.com/dalehenrich/filetree/issues/143
I'm planning a bit of a rewrite for GitFileTree (saw a few significant issues on Monticello to git integration pop-up recently) and I'll add that along with the others.
Thanks. By the way, for this specific case (run Pharo from UI), I still think it should be configurable with the OS (from some profile file) but I did not find a solution yet. Another option could be to retrieve the content of path variable with NativeBoost and use it to run the git command. I will test. Christophe.
2015-02-03 22:04 GMT+01:00 Christophe Demarey <christophe.demarey@inria.fr>:
Hi Thierry,
------------------------------
*De: *"Thierry Goubier" <thierry.goubier@gmail.com> *Ã: *"Pharo Development List" <pharo-dev@lists.pharo.org> *Envoyé: *Mardi 3 Février 2015 18:51:05 *Objet: *Re: [Pharo-dev] GitFileTree - Git command not found (is which shell startup script is run when pharo launched from UI)
Hi Christophe,
looks like that a configuration option for the path to the git command is necessary :) https://github.com/dalehenrich/filetree/issues/143
I'm planning a bit of a rewrite for GitFileTree (saw a few significant issues on Monticello to git integration pop-up recently) and I'll add that along with the others.
Thanks. By the way, for this specific case (run Pharo from UI), I still think it should be configurable with the OS (from some profile file) but I did not find a solution yet. Another option could be to retrieve the content of path variable with NativeBoost and use it to run the git command. I will test.
Ok, tell me how it goes. OSProcess/CommandShell has options and examples to retrieve and extend the path before calling an external function, so this may also be a way to solve it. A third one would be to download a git static executable along with the GitFileTree support. Thierry
Christophe.
participants (6)
-
Christophe Demarey -
Christophe Demarey -
kilon alios -
Manfred Kröhnert -
Peter Uhnák -
Thierry Goubier