objectbox / objectbox-go

Embedded Go Database, the fast alternative to SQLite, gorm, etc.
https://objectbox.io
Apache License 2.0
1.07k stars 46 forks source link

Maybe fix this ? #30

Closed ghost closed 2 years ago

ghost commented 3 years ago

install.ps1 attempts a download from non existing path.

Creating download directory download
Downloading C-API v0.13.0 into download\objectbox-0.13.0.tgz

System.Management.Automation.MethodInvocationException: Exception calling "DownloadFile" with "2" argument(s): "An
exception occurred during a WebClient request." ---> System.Net.WebException: An exception occurred during a WebClient
request. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path
'C:\WINDOWS\system32\download\objectbox-0.13.0.tgz'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights,
FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean
bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
   at System.Net.WebClient.DownloadFile(Uri address, String fileName)
   --- End of inner exception stack trace ---
   at System.Net.WebClient.DownloadFile(Uri address, String fileName)
   at CallSite.Target(Closure , CallSite , Object , Object , Object )
   --- End of inner exception stack trace ---
   at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception
exception)
   at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
At line:1 char:1
+ .\install.ps1
+ ~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,install.ps1

Press any key to exit:
greenrobot-team commented 3 years ago

Are you running the script from within C:\WINDOWS\system32? Maybe try running it from a user directory.

vaind commented 3 years ago

That'd be the changed download URL for objectbox-c (moved from Bintray to GitHub releases). For now (until the script is fixed), you can use install.sh via Git Bash or download the objectbox-c library manually from https://github.com/objectbox/objectbox-c/releases

ghost commented 2 years ago

From Our values section:

Share & Enjoy – treat others the way you want to be treated, don’t take yourself too seriously; share and learn together in a fun way; enjoy and bring joy.

Now, it doesn't bring me much joy to notice that 4 months have elapsed since this ticket was opened and nobody has found the time to fix the install.ps1 script.

As a side observation:

$downloadDir = 'download' - leads to an attempt to download in C:\WINDOWS\system32\download and I presume you mean $downloadDir = Join-Path $PSScriptRoot 'download'.