Skip to content

Commit 46f0e42

Browse files
committed
chore: cleanup command
1 parent e63042c commit 46f0e42

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

cmd/restore.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import (
99
"github.com/spf13/cobra"
1010
)
1111

12-
var tempDir string
13-
1412
var RestoreCmd = &cobra.Command{
1513
Use: "restore",
1614
Short: "Restore the current scroll",
@@ -34,5 +32,4 @@ var RestoreCmd = &cobra.Command{
3432
}
3533

3634
func init() {
37-
RestoreCmd.Flags().StringVarP(&tempDir, "temp-dir", "", "", "Temporary directory where to move the soon to be deleted files to. Files will be restored, in case an error occured while fetching / extracting the snapshot. Only works when --skip-safety is not set.")
3835
}

internal/core/services/snapshot/restore_service.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ func (rc *SnapshotService) RestoreSnapshot(dir string, source string, options po
144144

145145
progressReader := &ProgressTracker{}
146146

147-
tmpDir := os.TempDir()
148-
dest := path.Join(tmpDir, ".snap_dl")
147+
dest := path.Join(dir, ".snap_dl")
149148

150149
os.RemoveAll(dest)
151150
defer os.RemoveAll(dest)

0 commit comments

Comments
 (0)