Closed aahmed-se closed 5 years ago
remap paths during windows execution
yeah we should...
The latest version of Buckaroo (v2.2) checks if Git is installed and uses that instead of LibGit2. Git on Windows supports backslashes in paths.
@nikhedonia you are right but the error is different now on 2.2.0
C:\Users\test\apache-pulsar-demo>buckaroo install
info Installing packages...
info No receipt found for buckaroo\github\buckaroo-pm\apache-pulsar; it will be installed.
info Installing buckaroo\github\buckaroo-pm\apache-pulsar...
Buckaroo.Bash+BashException: The command "git -C buckaroo\github\buckaroo-pm\apache-pulsar fetch origin +refs/heads/*:refs/heads/* +refs/tags/*:refs/tags/*" exited with code 128
at Buckaroo.Bash.runBashSync@66-4.Invoke(Unit _arg3) in C:\projects\buckaroo\buckaroo\Bash.fs:line 68
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a,b](AsyncActivation`1 ctxt, FSharpFunc`2 userCode, b result1)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
not sure what's the reason
My hypothesis is that LibGit2 does not support backslashes and as a result we may have created a broken git repository in your cache.
There are two cache folders on your system and deleting them should resolve the issue:
global cache: ~/Documents/.buckaroo/cache
project local cache: $ProjectRoot/buckaroo
Let me know if that resolves your issue.
In the meantime I'll try to narrow down the issue and if required report the issue to the maintainers of LibGit2.
deleted both and tried again
C:\Users\test\apache-pulsar-demo>buckaroo install
info Installing packages...
info No receipt found for buckaroo\github\buckaroo-pm\apache-pulsar; it will be installed.
info Installing buckaroo\github\buckaroo-pm\apache-pulsar...
[git] info Shallow cloning https://github.com/buckaroo-pm/apache-pulsar.git
Buckaroo.Bash+BashException: The command "git -C buckaroo\github\buckaroo-pm\apache-pulsar fetch origin +refs/heads/*:refs/heads/* +refs/tags/*:refs/tags/*" exited with code 128
at Buckaroo.Bash.runBashSync@66-4.Invoke(Unit _arg3) in C:\projects\buckaroo\buckaroo\Bash.fs:line 68
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a,b](AsyncActivation`1 ctxt, FSharpFunc`2 userCode, b result1)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
What happens if you do:
git clone --depth=1 https://github.com/buckaroo-pm/apache-pulsar.git
looks fine
C:\Users\test\test>git clone --depth=1 https://github.com/buckaroo-pm/apache-pulsar.git
Cloning into 'apache-pulsar'...
remote: Enumerating objects: 4733, done.
remote: Counting objects: 100% (4733/4733), done.
remote: Compressing objects: 100% (3499/3499), done.
remote: Total 4733 (delta 1541), reused 2271 (delta 496), pack-reused 0Receiving objects: 100% (4733/4733), 9.09 MiB Receiving objects: 100% (4733/4733), 12.58 MiB | 20.61 MiB/s, done.
Resolving deltas: 100% (1541/1541), done.
Checking out files: 100% (3458/3458), done.
C:\Users\test\test>
Sry for the late response. The command that failed was:
The command "git -C buckaroo\github\buckaroo-pm\apache-pulsar fetch origin +refs/heads/*:refs/heads/* +refs/tags/*:refs/tags/*" exited with code 128```
Unfortunately the error-message didn't make it to the console. Only way we could know more is if @aahmed-se would run this command in powershell.
We should print the reason of failure for fatal errors and maybe pipe all errors to an error.log. So far I was not able to reproduce this error
PS C:\Users\test\apache-pulsar-demo> buckaroo install 2>$1 > buckaroo.log
here are the contents of the file
info Installing packages...
info No receipt found for buckaroo\github\buckaroo-pm\apache-pulsar; it will be installed.
info Installing buckaroo\github\buckaroo-pm\apache-pulsar...
Buckaroo.Bash+BashException: The command "git -C buckaroo\github\buckaroo-pm\apache-pulsar fetch origin +refs/heads/*:refs/heads/* +refs/tags/*:refs/tags/*" exited with code 128
at Buckaroo.Bash.runBashSync@66-4.Invoke(Unit _arg3) in C:\projects\buckaroo\buckaroo\Bash.fs:line 68
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a,b](AsyncActivation`1 ctxt, FSharpFunc`2 userCode, b result1)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
Thanks for the quick response but I meant running the command in bold:
git -C buckaroo\github\buckaroo-pm\apache-pulsar fetch origin +refs/heads/*:refs/heads/* +refs/tags/*:refs/tags/*
sry for beeing unclear.
this is the only error I get
fatal: bad config line 7 in file .git/config
git version
git version 2.21.0.windows.1
I bet if you open it you'll see backslashes on line 7
.
This is a git folder generated by LibGit2 (when using the old Buckaroo 2.0.0).
It should work if you delete the buckaroo folder inside your project folder.
that solves it
Wasn't able to install packages on windows
Description
Possible Fix
remap paths during windows execution
Version
2.0.0