Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
"net/http"

"github.com/minio/selfupdate"
"github.com/vvair/selfupdate"
)

func doUpdate(url string) error {
Expand Down
5 changes: 3 additions & 2 deletions apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os"
"path/filepath"

"github.com/minio/selfupdate/internal/osext"
"github.com/vvair/selfupdate/internal/osext"
)

// Apply performs an update of the current executable or opts.TargetFile, with
Expand Down Expand Up @@ -124,8 +124,9 @@ func CommitBinary(opts Options) error {
_ = os.Remove(oldPath)

// move the existing executable to a new file in the same directory
// skip backup if the target file does not exist.
err = os.Rename(targetPath, oldPath)
if err != nil {
if err != nil && !os.IsNotExist(err) {
return err
}

Expand Down
2 changes: 1 addition & 1 deletion apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"os"
"testing"

"github.com/minio/selfupdate/internal/binarydist"
"github.com/vvair/selfupdate/internal/binarydist"
)

var (
Expand Down
8 changes: 4 additions & 4 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This example shows how to update a program remotely from a URL.
"fmt"
"net/http"

"github.com/minio/selfupdate"
"github.com/vvair/selfupdate"
)

func doUpdate(url string) error {
Expand Down Expand Up @@ -42,7 +42,7 @@ may be applied by implementing the Patcher interface.
"encoding/hex"
"io"

"github.com/minio/selfupdate"
"github.com/vvair/selfupdate"
)

func updateWithPatch(patch io.Reader) error {
Expand Down Expand Up @@ -75,7 +75,7 @@ specified as a hex string.
"encoding/hex"
"io"

"github.com/minio/selfupdate"
"github.com/vvair/selfupdate"
)

func updateWithChecksum(binary io.Reader, hexChecksum string) error {
Expand Down Expand Up @@ -112,7 +112,7 @@ with the private key and distribute the signature along with the selfupdate.
"encoding/hex"
"io"

"github.com/minio/selfupdate"
"github.com/vvair/selfupdate"
)

func verifiedUpdate(binary io.Reader, hexChecksum string) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/minio/selfupdate
module github.com/vvair/selfupdate

go 1.24.0

Expand Down
2 changes: 1 addition & 1 deletion patcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package selfupdate
import (
"io"

"github.com/minio/selfupdate/internal/binarydist"
"github.com/vvair/selfupdate/internal/binarydist"
)

// Patcher defines an interface for applying binary patches to an old item to get an updated item.
Expand Down