Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assume PHP can find git instead of hardcode path #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Assume PHP can find git instead of hardcode path #48

wants to merge 1 commit into from

Conversation

josh4trunks
Copy link

@josh4trunks josh4trunks commented May 13, 2016

  1. Assume PHP can find git path instead of hardcoding /usr/bin/git

  2. Remove redundant windows_mode() which is now the default behaviour

  3. Bump version

Fixes #47

1) Assume PHP can find git path instead of hardcoding /usr/bin/git
    * For PHP-FPM this is set in the config with a line similar to `env[PATH] = /usr/local/bin:/usr/bin:/bin`
2) Remove redundant `windows_mode()` which is now the default
3) Bump version
@josh4trunks
Copy link
Author

@andrevanzuydam what OS are you using Git.php on? Do you mind testing it this change works/breaks anything for you?

@andrevanzuydam
Copy link

I am using Ubuntu, Windows & MacOs, I will give you some feedback

On Fri, May 13, 2016 at 8:40 PM, Joshua Ruehlig notifications@github.com
wrote:

@andrevanzuydam https://github.com/andrevanzuydam what OS are you using
Git.php on? Do you mind testing it this change works/breaks anything for
you?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#48 (comment)

[image: --]

Andre van Zuydam
[image: https://]about.me/andrevanzuydam
https://about.me/andrevanzuydam?promo=email_sig&utm_source=email_sig&utm_medium=email_sig&utm_campaign=external_links

[image: http://www.daniweb.com/profiles/1108517/Andre-van-Zuydam]
http://www.daniweb.com/profiles/1108517/Andre-van-Zuydam

[image: https://www.openhub.net/accounts/75973?ref=Detailed]
https://www.openhub.net/accounts/75973?ref=Detailed

@DrSeussFreak
Copy link

DrSeussFreak commented Sep 8, 2016

I'm running into an issue due to this now myself. I am running windows and receive

Fatal error: Uncaught Exception: The system cannot find the path specified. in D:\www\webapp\app\libraries\kbjr\Git.php\Git.php:317 Stack trace: #0 D:\www\webapp\app\libraries\kbjr\Git.php\Git.php(332): GitRepo->run_command('/usr/bin/git br...') #1 D:\www\webapp\app\libraries\kbjr\Git.php\Git.php(492): GitRepo->run('branch') #2 D:\www\webapp\app\libraries\kbjr\Git.php\Git.php(532): GitRepo->list_branches(true) #3 D:\www\webapp\webapp\utility\Git.php(42): GitRepo->active_branch() #4 D:\www\webapp\webapp\db\DbUpdate.php(72): webapp\utility\Git->__construct() #5 D:\www\webapp\www\install\step2.php(153): webapp\db\DbUpdate->__construct(Array) #6 {main} thrown in D:\www\webapp\app\libraries\kbjr\Git.php\Git.php on line 317

each time I am configuring my webapp. Anyone have a workaround for this?

@josh4trunks
Copy link
Author

your app can enable windows mode, or change the path. but by default we shouldn't be hardcoding this path.

@DrSeussFreak
Copy link

how would I enable windows mode?

@josh4trunks
Copy link
Author

I'm not sure, I haven't looked into this code for a while. but I do remember it is an option.

@DrSeussFreak
Copy link

I've seen the function within git.php, ok, I will figure it out, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants