Skip to content

single binary curl download cannot handle file overwrite #501

@jovezhong

Description

@jovezhong

Describe what's wrong

curl -sSf https://raw.githubusercontent.com/timeplus-io/proton/develop/install.sh | sh

is the quick way to install proton.
But if I have downloaded this once, next time I ran this command, it will show file exists but without waiting for y/n to overwrite, it just download the file and create the 2nd file without overwriting the previous proton binary

curl -sSf https://raw.githubusercontent.com/timeplus-io/proton/develop/install.sh | sh
-n 'proton' file exists. Do you want to overwrite it? (y/n):

Downloading proton-v1.3.31-Darwin-arm64...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  425M  100  425M    0     0  37.9M      0  0:00:11  0:00:11 --:--:-- 41.6M
Download and permission setting completed: proton-v1.3.31-Darwin-arm64

To interact with Proton:
1. Start the Proton server(data store in current folder ./proton-data/ ):
   ./proton-v1.3.31-Darwin-arm64 server start

2. In a separate terminal, connect to the server:
   ./proton-v1.3.31-Darwin-arm64 client
   (Note: If you encounter a 'connection refused' error, use: ./proton-v1.3.31-Darwin-arm64 client --host 127.0.0.1)

3. To terminate the server, press ctrl+c in the server terminal.

For detailed usage and more information, check out the Timeplus documentation:
https://docs.timeplus.com/
ls -lh
total 1757200
-rwxr--r--@ 1 jove  staff   426M 16 Jan 17:20 proton
-rwxr--r--@ 1 jove  staff   426M 17 Jan 09:34 proton-v1.3.31-Darwin-arm64

How to reproduce

Error message and/or stacktrace

Additional context

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions