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

Allow Unsupported platforms to run, when Environment variables are set. #200

Merged
merged 2 commits into from
Aug 31, 2018
Merged

Allow Unsupported platforms to run, when Environment variables are set. #200

merged 2 commits into from
Aug 31, 2018

Conversation

adamsteen
Copy link
Contributor

@adamsteen adamsteen commented Aug 10, 2018

I develop on OpenBSD and one of the packages i have taken an interest in, uses surf for continuous integration, relying on dugite for git support.

When i initially looked at the problem i thought i could set GIT_EXEC_PATH and LOCAL_GIT_DIRECTORY and things might work, but i hit some throw new Error('Git not supported on platform: ' + process.platform) errors.

With these changes and when the environment variables are set, the Git not supported on platform are not hit and dugite uses my installed git package, with the environment variables not set there is no functionally change.

I did the following changed.
Move platform check and Error into resolveEmbeddedGitDir, so if the
Environment variable 'LOCAL_GIT_DIRECTORY' is set, the error throw new Error('Git not supported on platform: ' + process.platform) is still executed.

Change path.join to set git-core and git to be if win32 else 'others' (with others being Unixes)

I didn't want to just target OpenBSD as i know of other developments using FreeBSD will also be impacted.

I know OpenBSD (and FreeBSD) are not supported and don't expect support, but by having these changes unsupported platforms have a chance of running.

[Edit] I have tested this change on OpenBSD and Windows.

Move platform check and Error into resolveEmbeddedGitDir, so if the
Environment variable 'LOCAL_GIT_DIRECTORY' is set, Unsupported platforms
are still able to run.

Change path.join to set git-core and git to be if win32 else 'others'
@shiftkey shiftkey self-assigned this Aug 13, 2018
@adamsteen
Copy link
Contributor Author

@shiftkey Ping!

Is there anything i can do to help this along?

@shiftkey
Copy link
Member

@adamsteen not really, just lacking bandwidth on my end to ponder the overall changes and ensure they don't affect the supported platforms.

I've got an open issue on the native toolchain to support FreeBSD desktop/dugite-native#82 and we use Docker to build Git for ARM64 already so I'd love for someone more familiar with that flavour of OS to see if we can support that.

Would proper OpenBSD support help here, which is a way off, or are you just interested in the escape hatch?

@adamsteen
Copy link
Contributor Author

@shiftkey proper OpenBSD would work also, but really i just want dugite to work in surf on OpenBSD so i can get CI setup.

@shiftkey shiftkey merged commit 6a643c0 into desktop:master Aug 31, 2018
@shiftkey
Copy link
Member

@adamsteen this has been published to NPM as v1.73.0

@adamsteen
Copy link
Contributor Author

@shiftkey thank you

@adamsteen adamsteen deleted the openbsd branch August 31, 2018 12:37
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.

2 participants