Open kaihendry opened 6 years ago
The v0.2.4 release has renamed the checksum file to up_0.2.4_checksums.txt instead of up_checksums.txt, which is causing the install.sh script to fail on a 404.
workaround is that you fork install.sh and rename the checksum file to match the release. or you can use mine instead.
curl -sfL https://gist.githubusercontent.com/quocnguyen/4fdb93be6049f2311c7be6d2eaf90238/raw/7b85022f0ac5ff5fa72b7a0b8d21e955396ff4c7/install.sh | sh
sorry about that! goreleaser must have made some small changes there, updated it recently
Regression with 0.2.5?
mbp:~ kaihendry$ curl -sfL https://raw.githubusercontent.com/apex/up/master/install.sh | sh
apex/up: checking GitHub for latest version
apex/up: found version 0.2.5 for darwin/amd64
apex/up: downloading https://github.com/apex/up/releases/download/v0.2.5/up_0.2.5_darwin_amd64.tar.gz
curl: (22) The requested URL returned error: 404 Not Found
@kaihendry are you still seeing that? I re-released the binaries (one was missing), but maybe GH's download server is confused now
@tj think it's working again. Upgraded successfully curl -sfL https://raw.githubusercontent.com/apex/up/master/install.sh | sh
my mbp & t460s.
Oh btw, not sure how this got closed but this bug is still an issue on Archlinux!
Error: installing: moving: rename /tmp/unpackit-639905158/up /usr/local/bin/up: invalid cross-device link
Sidenote: I did notice https://aur.archlinux.org/packages/apex-bin/ but it seems horribly out of date. I wonder if it can be automated with a git hook or something...
ah you can't do atomic renames across partitions. Hmm maybe we could detect that and fall back on just doing a copy. For now if you do cp /tmp/unpackit-639905158/up /usr/local/bin/up
it should be ok I think
For now if anyone hits this you can use TMPDIR=/someother/dir up upgrade
but that's not ideal
Why not a simple move file? e.g. https://github.com/kaihendry/lk2/blob/master/main.go#L339
@kaihendry rename
is atomic, so it either is successful or fails but never a partial failure which is unfortunately not true for copying—though honestly probably not a big deal in practice haha. It should at least fall back to a copy if rename
can't be performed
Error: installing: moving: rename /tmp/unpackit-688898816/up /usr/local/bin/up: invalid cross-device link
And the workaround is not working either: